Hashar has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380502 )
Change subject: dib: add some spec test ...................................................................... dib: add some spec test Attempts to compile the puppet catalog of the CI image. Clone operations/puppet in the Jenkins job. Assume that operations/puppet.git is available. Change-Id: I7ae0d53844e333f4c1e05619d80ddcce1076bc57 --- M Gemfile M Rakefile A dib/puppet/Rakefile A dib/puppet/spec/.gitignore A dib/puppet/spec/hosts/ci_jessie_wikimedia_spec.rb M jjb/integration.yaml 6 files changed, 36 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/02/380502/1 diff --git a/Gemfile b/Gemfile index 73c2108..6f98938 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,7 @@ gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 3.8.5', require: false gem 'puppet-lint', '2.0.2' gem 'puppetlabs_spec_helper', '< 2.0.0', require: false +gem 'rspec-puppet', '~> 2.6.0' # Puppet 3.7 fails on ruby 2.2+ # https://tickets.puppetlabs.com/browse/PUP-3796 diff --git a/Rakefile b/Rakefile index e091966..d500198 100644 --- a/Rakefile +++ b/Rakefile @@ -8,8 +8,15 @@ config.log_format = '%{path}:%{line} %{KIND} %{message} (%{check})' end +desc 'Run spec for dib/puppet' +task :dib_spec do + Dir.chdir 'dib/puppet' do + fail unless system('rake spec') + end +end + desc 'Run all build/tests commands (CI entry point)' -task test: [:syntax, :lint] +task test: [:syntax, :lint, :dib_spec] desc 'Show the help' task :help do diff --git a/dib/puppet/Rakefile b/dib/puppet/Rakefile new file mode 100644 index 0000000..cd3d379 --- /dev/null +++ b/dib/puppet/Rakefile @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/dib/puppet/spec/.gitignore b/dib/puppet/spec/.gitignore new file mode 100644 index 0000000..76163ab --- /dev/null +++ b/dib/puppet/spec/.gitignore @@ -0,0 +1 @@ +/fixtures diff --git a/dib/puppet/spec/hosts/ci_jessie_wikimedia_spec.rb b/dib/puppet/spec/hosts/ci_jessie_wikimedia_spec.rb new file mode 100644 index 0000000..5ad1b12 --- /dev/null +++ b/dib/puppet/spec/hosts/ci_jessie_wikimedia_spec.rb @@ -0,0 +1,18 @@ +require 'rspec-puppet' +require 'puppetlabs_spec_helper/puppet_spec_helper' + +RSpec.configure do |c| + c.manifest = File.expand_path(File.join(__dir__, '..', '..', 'ciimage.pp')) + c.module_path = File.expand_path( + File.join( + __dir__, '../../../../../../operations/puppet/modules')) +end + +describe 'ci-jessie-wikimedia' do + let(:facts) { { + :initsystem => 'systemd', + :lsbdistrelease => 'Jessie', + :lsbdistid => 'Debian', + } } + it { should compile } +end diff --git a/jjb/integration.yaml b/jjb/integration.yaml index e5f0ce9..7f34395 100644 --- a/jjb/integration.yaml +++ b/jjb/integration.yaml @@ -192,6 +192,13 @@ - zuul builders: - castor-load + - shell: | + zuul-cloner --version + zuul-cloner --color \ + --cache-dir /srv/git \ + https://gerrit.wikimedia.org/r/p \ + integration/config \ + operations/puppet - run-tox: venv: dib - bundle-nodepool: -- To view, visit https://gerrit.wikimedia.org/r/380502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ae0d53844e333f4c1e05619d80ddcce1076bc57 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
