diff --git a/.travis.yml b/.travis.yml index 71359692..b6064dd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ --- +dist: xenial language: ruby cache: bundler before_install: @@ -12,75 +13,48 @@ script: bundler_args: --without system_tests rvm: - 2.5.3 -env: - global: - - PUPPET_GEM_VERSION="~> 6.0" +stages: + - static + - spec + - acceptance + - + if: tag =~ ^v\d + name: deploy matrix: fast_finish: true include: - - bundler_args: + bundler_args: dist: trusty - env: PLATFORMS=deb_puppet5 + env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply rvm: 2.5.3 - before_script: - - bundle exec rake 'litmus:provision_list[travis_deb]' - - bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='localhost*' - - bundle exec rake 'litmus:install_agent[puppet5]' - - bundle exec rake litmus:install_module - script: - - bundle exec rake litmus:acceptance:parallel + script: bundle exec rake beaker services: docker stage: acceptance sudo: required - - bundler_args: + bundler_args: dist: trusty - env: PLATFORM=centos:deb_puppet6 + env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply rvm: 2.5.3 - before_script: - - bundle exec rake 'litmus:provision_list[travis_deb]' - - bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='localhost*' - - bundle exec rake 'litmus:install_agent[puppet6]' - - bundle exec rake litmus:install_module - script: - - bundle exec rake litmus:acceptance:parallel - services: docker - sudo: required - - - bundler_args: - dist: trusty - env: PLATFORMS=el_puppet5 - rvm: 2.5.3 - before_script: - - bundle exec rake 'litmus:provision_list[travis_el]' - - bundle exec rake 'litmus:install_agent[puppet5]' - - bundle exec rake litmus:install_module - script: - - bundle exec rake litmus:acceptance:parallel - services: docker - sudo: required - - - bundler_args: - dist: trusty - env: PLATFORM=centos:el_puppet6 - rvm: 2.5.3 - before_script: - - bundle exec rake 'litmus:provision_list[travis_el]' - - bundle exec rake 'litmus:install_agent[puppet6]' - - bundle exec rake litmus:install_module - script: - - bundle exec rake litmus:acceptance:parallel + script: bundle exec rake beaker services: docker stage: acceptance sudo: required - - env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop" - - - env: CHECK=parallel_spec + env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint" + stage: static - env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec rvm: 2.4.5 + stage: spec + - + env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec + rvm: 2.5.3 + stage: spec + - + env: DEPLOY_TO_FORGE=yes + stage: deploy branches: only: - master @@ -88,12 +62,3 @@ branches: - release notifications: email: false -deploy: - provider: puppetforge - user: puppet - password: - secure: "" - on: - tags: true - all_branches: true - condition: "$DEPLOY_TO_FORGE = yes" diff --git a/Rakefile b/Rakefile index d9b223c6..13b58c86 100644 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,7 @@ require 'puppet-syntax/tasks/puppet-syntax' require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any? require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any? require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any? +require 'puppet_pot_generator/rake_tasks' def changelog_user return unless Rake.application.top_level_tasks.include? "changelog" diff --git a/appveyor.yml b/appveyor.yml index a8229ded..ec389492 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,6 +3,7 @@ version: 1.1.x.{build} branches: only: - master + - release skip_commits: message: /^\(?doc\)?.*/ clone_depth: 10 @@ -33,29 +34,8 @@ environment: PUPPET_GEM_VERSION: ~> 6.0 RUBY_VERSION: 25-x64 CHECK: parallel_spec - - - RUBY_VERSION: 25-x64 - ACCEPTANCE: yes - TARGET_HOST: localhost - - - RUBY_VERSION: 25-x64 - ACCEPTANCE: yes - TARGET_HOST: localhost - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - #matrix: - # fast_finish: true -for: -- - matrix: - only: - - ACCEPTANCE: yes - install: - - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% - - bundle install --jobs 4 --retry 2 - - type Gemfile.lock - test_script: - - bundle exec rake spec_prep - - bundle exec rake litmus:acceptance:localhost +matrix: + fast_finish: true install: - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% - bundle install --jobs 4 --retry 2 --without system_tests diff --git a/metadata.json b/metadata.json index 74a02ea5..76fbf682 100644 --- a/metadata.json +++ b/metadata.json @@ -102,6 +102,6 @@ } ], "template-url": "https://github.com/puppetlabs/pdk-templates#master", - "template-ref": "heads/master-0-g2b33205", - "pdk-version": "1.10.0" + "template-ref": "heads/master-0-gb096033", + "pdk-version": "1.11.1" } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 31e3c902..c09e0024 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -29,6 +29,11 @@ end end +# read default_facts and merge them over what is provided by facterdb +default_facts.each do |fact, value| + add_custom_fact fact, value +end + RSpec.configure do |c| c.default_facts = default_facts c.before :each do @@ -38,6 +43,7 @@ end c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT'] c.after(:suite) do + RSpec::Puppet::Coverage.report!(0) end end