forked from voxpupuli/puppet-cassandra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
810 additions
and
987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
jobs: | ||
build: | ||
docker: | ||
- | ||
environment: | ||
PUPPET_VERSION: "~> 3.8" | ||
STRICT_VARIABLES: true | ||
image: "ruby:2.1.9" | ||
steps: | ||
- checkout | ||
- | ||
restore_cache: | ||
keys: | ||
- "projectname-{{ .Branch }}-{{ checksum \"Gemfile\" }}" | ||
- "projectname-{{ .Branch }}" | ||
- projectname-master | ||
- | ||
run: | ||
command: "bundle install --without development acceptance --path vendor/bundle" | ||
name: "Bundle Install" | ||
- | ||
run: | ||
command: "bundle clean --force" | ||
name: "Bundle Cleanup" | ||
- | ||
save_cache: | ||
key: "projectname-{{ .Branch }}-{{ checksum \"Gemfile\" }}" | ||
paths: | ||
- vendor/bundle | ||
- | ||
run: | ||
command: "bundle clean --force" | ||
name: "Bundle Cleanup" | ||
- | ||
run: | ||
command: "bundle exec puppet --version" | ||
name: "Show Puppet version" | ||
- | ||
run: | ||
command: "bundle exec travis-lint" | ||
name: "TravisCI Lint" | ||
- | ||
run: | ||
command: "bundle exec rake metadata_lint" | ||
name: "Puppet Metadata Lint" | ||
- | ||
run: | ||
command: "bundle exec rake lint" | ||
name: "Puppet Lint" | ||
- | ||
run: | ||
command: "bundle exec rake validate" | ||
name: "Validate the Puppet code" | ||
- | ||
run: | ||
command: "bundle exec rake spec SPEC_OPTS=\"--format documentation --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/puppet.xml\"" | ||
name: "Spec tests" | ||
- | ||
deploy: | ||
name: Deploy from master | ||
command: | | ||
if [ "${CIRCLE_BRANCH}" == "master" -a -z "${RUN_NIGHTLY_BUILD}" ]; then | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CircleCI" | ||
bundle exec rake strings:gh_pages:update | ||
bundle exec rake deploy | ||
fi | ||
working_directory: ~/cassandra | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,13 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'Bootstrap' do | ||
bootstrap_pp = <<-EOS | ||
case downcase($::operatingsystem) { | ||
'centos': { | ||
if $::operatingsystemmajrelease == 6 { | ||
exec { '/bin/cp /opt/rh/ruby200/enable /etc/profile.d/ruby.sh': } -> | ||
exec { '/bin/rm /usr/bin/ruby /usr/bin/gem': } -> | ||
exec { '/usr/sbin/alternatives --install /usr/bin/ruby ruby /opt/rh/ruby200/root/usr/bin/ruby 1000': } -> | ||
exec { '/usr/sbin/alternatives --install /usr/bin/gem gem /opt/rh/ruby200/root/usr/bin/gem 1000': } | ||
} | ||
} | ||
'ubuntu': { | ||
if $::operatingsystemmajrelease == 12.04 { | ||
package {'python-software-properties':} -> | ||
exec {'/usr/bin/apt-add-repository ppa:brightbox/ruby-ng':} -> | ||
exec {'/usr/bin/apt-get update': } -> | ||
package {'ruby2.0': } -> | ||
exec { '/bin/rm /usr/bin/ruby': } -> | ||
exec { '/usr/sbin/update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby2.0 1000': } | ||
} | ||
} | ||
} | ||
EOS | ||
osfamily = fact('osfamily') | ||
roles = hosts[0]['roles'] | ||
t = TestManifests.new(roles, 0) | ||
bootstrap_pp = t.bootstrap_pp() | ||
|
||
describe '########### Node specific manifest.' do | ||
it 'should work with no errors' do | ||
apply_manifest(bootstrap_pp, catch_failures: true) | ||
shell('[ -d /opt/rh/ruby200 ] && /usr/bin/gem install puppet -v 3.8.7 --no-rdoc --no-ri; true') | ||
end | ||
describe 'Test Entry Criteria' do | ||
it "Should work with no errors (#{osfamily})" do | ||
apply_manifest(bootstrap_pp, catch_failures: true) | ||
shell('[ -d /opt/rh/ruby200 ] && /usr/bin/gem install puppet -v 3.8.7 --no-rdoc --no-ri; true') | ||
end | ||
end |
Oops, something went wrong.