Merge pull request #904 from anarcat/sources-list-remove
authorcarabasdaniel <daniel.carabas@puppet.com>
Thu, 13 Feb 2020 07:52:25 +0000 (09:52 +0200)
committerGitHub <noreply@github.com>
Thu, 13 Feb 2020 07:52:25 +0000 (09:52 +0200)
MODULES-10543: remove sources.list file on purging

.github/workflows/release.yml [new file with mode: 0644]
.sync.yml
.travis.yml
Gemfile
Rakefile
manifests/backports.pp
metadata.json
provision.yaml
spec/spec_helper.rb

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644 (file)
index 0000000..0311717
--- /dev/null
@@ -0,0 +1,46 @@
+name: "release"
+
+on: 
+  push:
+    branches:
+      - 'release'
+
+jobs:
+  LitmusAcceptance:
+    env:
+      HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
+      HONEYCOMB_DATASET: litmus tests
+    runs-on: self-hosted
+    strategy:
+      matrix:
+        ruby_version: [2.5.x]
+        puppet_gem_version: [~> 6.0]
+        platform: [release_checks]
+        agent_family: ['puppet5', 'puppet6']
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Litmus Parallel
+      uses: puppetlabs/action-litmus_parallel@master
+      with:
+        platform: ${{ matrix.platform }}
+        agent_family: ${{ matrix.agent_family }}
+  Spec:
+    runs-on: self-hosted
+    strategy:
+      matrix:
+        check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
+        ruby_version: [2.5.x]
+        puppet_gem_version: [~> 5.0, ~> 6.0]
+        exclude:
+        - puppet_gem_version: ~> 5.0
+          check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
+        - ruby_version: 2.5.x
+          puppet_gem_version: ~> 5.0
+    steps:
+    - uses: actions/checkout@v1
+    - name: Spec Tests
+      uses: puppetlabs/action-litmus_spec@master
+      with:
+        puppet_gem_version: ${{ matrix.puppet_gem_version }}
+        check: ${{ matrix.check }}
index 88dbcc69acc080e2cd09aa16708655a92fe3b746..eb63e5bb3eea0ed254932aca565857751c85707d 100644 (file)
--- a/.sync.yml
+++ b/.sync.yml
@@ -8,6 +8,8 @@
     - rubocop-i18n
     - rubocop-rspec
 ".travis.yml":
+  global_env: 
+    - HONEYCOMB_WRITEKEY="7f3c63a70eecc61d635917de46bea4e6",HONEYCOMB_DATASET="litmus tests"
   deploy_to_forge:
     enabled: false
   branches:
     services: docker
     sudo: required
     stage: acceptance
+  - bundler_args: 
+    dist: trusty
+    env: PLATFORMS=ub_puppet5
+    rvm: 2.5.3
+    before_script:
+    - bundle exec rake 'litmus:provision_list[travis_ub]'
+    - 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
+    services: docker
+    stage: acceptance
+    sudo: required
+  - bundler_args: 
+    dist: trusty
+    env: PLATFORM=ub_puppet6
+    rvm: 2.5.3
+    before_script:
+    - bundle exec rake 'litmus:provision_list[travis_ub]'
+    - 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
+    stage: acceptance
   simplecov: true
+  notifications:
+    slack:
+      secure: KeXxAkZ1x/P1otYM3pgpEFnJdFRLDDz0YlTmDRwdNYy09LGo4lRUuUUEUUZoTe4oQaMb3+NigiAs+3j2A7OIMKlcUFWz5zetqnyMdIceJm99iJOD6Ng/kVblo38bN28oVwss66XzG1T0c0+YFMF+X0NkUezbr6RaJrZNsCNTH9M=
 appveyor.yml:
   delete: true
 Gemfile:
index 1fc720dc5c261c52b0f20466550ed0c69486c6d3..467c135b4906f6de7f9a8616c89db4166f41ea7c 100644 (file)
@@ -5,7 +5,10 @@ cache: bundler
 before_install:
   - bundle -v
   - rm -f Gemfile.lock
-  - gem update --system $RUBYGEMS_VERSION
+  - "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
+  - "# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used"
+  - "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
+  - '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
   - gem --version
   - bundle -v
 script:
@@ -13,6 +16,9 @@ script:
 bundler_args: --without system_tests
 rvm:
   - 2.5.3
+env:
+  global:
+    - HONEYCOMB_WRITEKEY="7f3c63a70eecc61d635917de46bea4e6",HONEYCOMB_DATASET="litmus tests"
 stages:
   - static
   - spec
@@ -51,6 +57,26 @@ matrix:
       services: docker
       stage: acceptance
       sudo: required
+    -
+      before_script: ["bundle exec rake 'litmus:provision_list[travis_ub]'", "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"]
+      bundler_args: 
+      dist: trusty
+      env: PLATFORMS=ub_puppet5
+      rvm: 2.5.3
+      script: ["bundle exec rake litmus:acceptance:parallel"]
+      services: docker
+      stage: acceptance
+      sudo: required
+    -
+      before_script: ["bundle exec rake 'litmus:provision_list[travis_ub]'", "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"]
+      bundler_args: 
+      dist: trusty
+      env: PLATFORM=ub_puppet6
+      rvm: 2.5.3
+      script: ["bundle exec rake litmus:acceptance:parallel"]
+      services: docker
+      stage: acceptance
+      sudo: required
 branches:
   only:
     - master
@@ -58,3 +84,5 @@ branches:
     - release
 notifications:
   email: false
+  slack:
+    secure: KeXxAkZ1x/P1otYM3pgpEFnJdFRLDDz0YlTmDRwdNYy09LGo4lRUuUUEUUZoTe4oQaMb3+NigiAs+3j2A7OIMKlcUFWz5zetqnyMdIceJm99iJOD6Ng/kVblo38bN28oVwss66XzG1T0c0+YFMF+X0NkUezbr6RaJrZNsCNTH9M=
diff --git a/Gemfile b/Gemfile
index 61d5e692838fb8fa5a21b5e8e28af4c38d9a05a6..582e584673a2ca031057a1a1b7051446221859b0 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -24,10 +24,10 @@ group :development do
   gem "json", '= 2.0.4',                                         require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
   gem "json", '= 2.1.0',                                         require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
   gem "rb-readline", '= 0.5.5',                                  require: false, platforms: [:mswin, :mingw, :x64_mingw]
-  gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
-  gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3',     require: false, platforms: [:ruby]
-  gem "puppet-module-win-default-r#{minor_version}", '~> 0.3',   require: false, platforms: [:mswin, :mingw, :x64_mingw]
-  gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3',       require: false, platforms: [:mswin, :mingw, :x64_mingw]
+  gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
+  gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4',     require: false, platforms: [:ruby]
+  gem "puppet-module-win-default-r#{minor_version}", '~> 0.4',   require: false, platforms: [:mswin, :mingw, :x64_mingw]
+  gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4',       require: false, platforms: [:mswin, :mingw, :x64_mingw]
   gem "github_changelog_generator",                              require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
   gem "puppet-lint-i18n",                                        require: false
 end
index c45dfc8c07e5a74f8fe4536a32a0f503d7084b21..d1ab1bc0651388a8ea445e184f686be43beb4b18 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
 require 'puppetlabs_spec_helper/rake_tasks'
 require 'puppet-syntax/tasks/puppet-syntax'
index 0fa69586e78089a3e38a867b59b2e4ffcc0be79c..1b9cabbaf10ff062d868f86f4dd6331380ee5b4b 100644 (file)
@@ -52,6 +52,9 @@ class apt::backports (
   Optional[Variant[String, Hash]] $key          = undef,
   Optional[Variant[Integer, String, Hash]] $pin = 200,
 ){
+
+  include apt
+
   if $location {
     $_location = $location
   }
index 95361fcf832777cb1c79610e34577f5d7aa3f85d..2bc40519e549d156c20cb7c2c8a385fd48cf0789 100644 (file)
@@ -42,6 +42,6 @@
     }
   ],
   "template-url": "https://github.com/puppetlabs/pdk-templates#master",
-  "template-ref": "heads/master-0-g643529a",
-  "pdk-version": "1.14.1"
+  "template-ref": "heads/master-0-g5d52853",
+  "pdk-version": "1.16.0"
 }
index fadfe699812bb8483dd450762399ddc075ab3905..28d160b1d97930f9090b38c0ceac9097a32ca213 100644 (file)
@@ -2,15 +2,21 @@
 default:
   provisioner: docker 
   images: ['waffleimage/debian8']
-travis_deb:
-  provisioner: docker
-  images: ['debian:8', 'debian:9', 'ubuntu:16.04', 'ubuntu:18.04']
-waffle_deb:
-  provisioner: docker 
-  images: ['waffleimage/debian8', 'waffleimage/debian9', 'waffleimage/ubuntu14.04', 'waffleimage/ubuntu16.04', 'waffleimage/ubuntu18.04']
 vagrant:
   provisioner: vagrant
-  images: ['centos/7', 'generic/ubuntu1804']
+  images: ['centos/7', 'generic/ubuntu1804'] 
+travis_deb:
+  provisioner: docker 
+  images: ['waffleimage/debian9', 'waffleimage/debian10']
+travis_ub:
+  provisioner: docker 
+  images: ['ubuntu:16.04', 'ubuntu:18.04']
+travis_el6:
+  provisioner: docker 
+  images: []
+travis_el7:
+  provisioner: docker 
+  images: []
 release_checks:
   provisioner: vmpooler
   images: ['debian-8-x86_64', 'debian-9-x86_64', 'debian-10-x86_64', 'ubuntu-1404-x86_64', 'ubuntu-1604-x86_64', 'ubuntu-1804-x86_64']
index c09e0024da88e5dc36642b80f75efdc9887a6065..bc023f51affdd6ac272aeb1b58ae847fd8213304 100644 (file)
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 RSpec.configure do |c|
   c.mock_with :rspec
 end