Skip to content

Commit 63d7409

Browse files
Merge pull request #283 from michaeltlombardi/ticket/master/FM-8856-litmusify
(FM-8856) Convert acceptance testing to litmus
2 parents 147b85f + 3cb1fe2 commit 63d7409

File tree

19 files changed

+848
-641
lines changed

19 files changed

+848
-641
lines changed

.fixtures.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
fixtures:
2+
repositories:
3+
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
4+
puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
5+
provision: 'https://github.com/puppetlabs/provision.git'
26
forge_modules:
37
pwshlib: "puppetlabs/pwshlib"
48
symlinks:

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "release"
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release'
7+
8+
jobs:
9+
LitmusAcceptance:
10+
runs-on: self-hosted
11+
strategy:
12+
matrix:
13+
ruby_version: [2.5.x]
14+
puppet_gem_version: [~> 6.0]
15+
platform: [release_checks]
16+
agent_family: ['puppet5', 'puppet6']
17+
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: Litmus Parallel
21+
uses: puppetlabs/action-litmus_parallel@master
22+
with:
23+
platform: ${{ matrix.platform }}
24+
agent_family: ${{ matrix.agent_family }}
25+
Spec:
26+
runs-on: self-hosted
27+
strategy:
28+
matrix:
29+
check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
30+
ruby_version: [2.5.x]
31+
puppet_gem_version: [~> 5.0, ~> 6.0]
32+
exclude:
33+
- puppet_gem_version: ~> 5.0
34+
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
35+
- ruby_version: 2.5.x
36+
puppet_gem_version: ~> 5.0
37+
steps:
38+
- uses: actions/checkout@v1
39+
- name: Spec Tests
40+
uses: puppetlabs/action-litmus_spec@master
41+
with:
42+
puppet_gem_version: ${{ matrix.puppet_gem_version }}
43+
check: ${{ matrix.check }}

.sync.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,44 @@
1010
deploy_to_forge:
1111
enabled: false
1212
simplecov: true
13-
before_install_pre:
14-
- bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -skip-sudo-check
15-
- 'pwsh -NoProfile -NoLogo -NonInteractive -Command \$PSVersionTable # Output the PowerShell Core version information'
16-
- if [ $BUNDLER_VERSION ]; then gem install -v $BUNDLER_VERSION bundler --no-rdoc --no-ri; fi
13+
use_litmus: true
14+
litmus:
15+
provision_list:
16+
- travis_deb
17+
- travis_ub
18+
- travis_el
1719
includes:
1820
- os: osx
19-
comment: test Mac OSX edition of PowerShell Core on a single job
2021
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
2122
rvm: 2.5.3
23+
stage: spec
24+
- bundler_args:
25+
os: osx
26+
rvm: 2.5.1
27+
before_script:
28+
- brew update
29+
- brew install openssl
30+
- bundle exec rake spec_prep
31+
script:
32+
- bundle exec rake litmus:acceptance:localhost
2233
stage: acceptance
2334
notifications:
2435
slack:
2536
secure: Yqv+S1Bwz19bor4xu3v7i5rLPzQuwTSZhO5wjsrX+jhKDN5/+e7e53x/v3Onjdrn9rjwFAxwzciAte0MO96xLFjyzWyUSziGur8/v3TcbRnnVQMOnIEj0HfmyLbx1cpxGK9V8MPsWQVAoHCklTtZIsRjMw0PcD8+aVKVF3NcBK4=
2637
appveyor.yml:
38+
use_litmus: true
39+
matrix_extras:
40+
- RUBY_VERSION: 25-x64
41+
ACCEPTANCE: 'yes'
42+
TARGET_HOST: localhost
43+
- RUBY_VERSION: 25-x64
44+
ACCEPTANCE: 'yes'
45+
TARGET_HOST: localhost
46+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2747
environment:
2848
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
2949
HONEYCOMB_DATASET: litmus tests
3050
simplecov: true
31-
install_post:
32-
- >-
33-
ps: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri https://github.com/PowerShell/PowerShell/raw/master/tools/install-powershell.ps1 -UseBasicParsing
34-
-OutFile install-pwsh.ps1"
35-
- 'ps: "& ./install-pwsh.ps1"'
36-
- set PATH=%LOCALAPPDATA%\Microsoft\powershell;%PATH%
37-
- pwsh -NoProfile -NoLogo -NonInteractive -Command $PSVersionTable
38-
- powershell -NoProfile -NoLogo -NonInteractive -Command $PSVersionTable
3951
Gemfile:
4052
optional:
4153
":development":

.travis.yml

Lines changed: 81 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
2+
os: linux
23
dist: xenial
34
language: ruby
45
cache: bundler
56
before_install:
6-
- bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -skip-sudo-check
7-
- pwsh -NoProfile -NoLogo -NonInteractive -Command \$PSVersionTable # Output the PowerShell Core version information
8-
- if [ $BUNDLER_VERSION ]; then gem install -v $BUNDLER_VERSION bundler --no-rdoc --no-ri; fi
97
- bundle -v
108
- rm -f Gemfile.lock
119
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
@@ -26,9 +24,81 @@ stages:
2624
- static
2725
- spec
2826
- acceptance
29-
matrix:
27+
jobs:
3028
fast_finish: true
3129
include:
30+
-
31+
before_script:
32+
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
33+
- "bundle exec rake 'litmus:install_agent[puppet5]'"
34+
- "bundle exec rake litmus:install_module"
35+
bundler_args:
36+
dist: trusty
37+
env: PLATFORMS=travis_deb_puppet5
38+
rvm: 2.5.3
39+
script: ["bundle exec rake litmus:acceptance:parallel"]
40+
services: docker
41+
stage: acceptance
42+
-
43+
before_script:
44+
- "bundle exec rake 'litmus:provision_list[travis_el]'"
45+
- "bundle exec rake 'litmus:install_agent[puppet5]'"
46+
- "bundle exec rake litmus:install_module"
47+
bundler_args:
48+
dist: trusty
49+
env: PLATFORMS=travis_el_puppet5
50+
rvm: 2.5.3
51+
script: ["bundle exec rake litmus:acceptance:parallel"]
52+
services: docker
53+
stage: acceptance
54+
-
55+
before_script:
56+
- "bundle exec rake 'litmus:provision_list[travis_ub]'"
57+
- "bundle exec rake 'litmus:install_agent[puppet5]'"
58+
- "bundle exec rake litmus:install_module"
59+
bundler_args:
60+
dist: trusty
61+
env: PLATFORMS=travis_ub_puppet5
62+
rvm: 2.5.3
63+
script: ["bundle exec rake litmus:acceptance:parallel"]
64+
services: docker
65+
stage: acceptance
66+
-
67+
before_script:
68+
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
69+
- "bundle exec rake 'litmus:install_agent[puppet6]'"
70+
- "bundle exec rake litmus:install_module"
71+
bundler_args:
72+
dist: trusty
73+
env: PLATFORMS=travis_deb_puppet6
74+
rvm: 2.5.3
75+
script: ["bundle exec rake litmus:acceptance:parallel"]
76+
services: docker
77+
stage: acceptance
78+
-
79+
before_script:
80+
- "bundle exec rake 'litmus:provision_list[travis_el]'"
81+
- "bundle exec rake 'litmus:install_agent[puppet6]'"
82+
- "bundle exec rake litmus:install_module"
83+
bundler_args:
84+
dist: trusty
85+
env: PLATFORMS=travis_el_puppet6
86+
rvm: 2.5.3
87+
script: ["bundle exec rake litmus:acceptance:parallel"]
88+
services: docker
89+
stage: acceptance
90+
-
91+
before_script:
92+
- "bundle exec rake 'litmus:provision_list[travis_ub]'"
93+
- "bundle exec rake 'litmus:install_agent[puppet6]'"
94+
- "bundle exec rake litmus:install_module"
95+
bundler_args:
96+
dist: trusty
97+
env: PLATFORMS=travis_ub_puppet6
98+
rvm: 2.5.3
99+
script: ["bundle exec rake litmus:acceptance:parallel"]
100+
services: docker
101+
stage: acceptance
32102
-
33103
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
34104
stage: static
@@ -41,10 +111,16 @@ matrix:
41111
rvm: 2.5.3
42112
stage: spec
43113
-
44-
comment: test Mac OSX edition of PowerShell Core on a single job
45114
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
46115
os: osx
47116
rvm: 2.5.3
117+
stage: spec
118+
-
119+
before_script: ["brew update", "brew install openssl", "bundle exec rake spec_prep"]
120+
bundler_args:
121+
os: osx
122+
rvm: 2.5.1
123+
script: ["bundle exec rake litmus:acceptance:localhost"]
48124
stage: acceptance
49125
branches:
50126
only:

appveyor.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,37 @@ environment:
3737
PUPPET_GEM_VERSION: ~> 6.0
3838
RUBY_VERSION: 25-x64
3939
CHECK: parallel_spec
40+
-
41+
RUBY_VERSION: 25-x64
42+
ACCEPTANCE: yes
43+
TARGET_HOST: localhost
44+
-
45+
RUBY_VERSION: 25-x64
46+
ACCEPTANCE: yes
47+
TARGET_HOST: localhost
48+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
49+
for:
50+
-
51+
matrix:
52+
only:
53+
- ACCEPTANCE: yes
54+
install:
55+
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
56+
- bundle install --jobs 4 --retry 2
57+
- type Gemfile.lock
58+
test_script:
59+
- bundle exec puppet -V
60+
- ruby -v
61+
- gem -v
62+
- bundle -v
63+
- bundle exec rake spec_prep
64+
- bundle exec rake litmus:acceptance:localhost
4065
matrix:
4166
fast_finish: true
4267
install:
4368
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
4469
- bundle install --jobs 4 --retry 2 --without system_tests
4570
- type Gemfile.lock
46-
- ps: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri https://github.com/PowerShell/PowerShell/raw/master/tools/install-powershell.ps1 -UseBasicParsing -OutFile install-pwsh.ps1"
47-
- ps: "& ./install-pwsh.ps1"
48-
- set PATH=%LOCALAPPDATA%\Microsoft\powershell;%PATH%
49-
- pwsh -NoProfile -NoLogo -NonInteractive -Command $PSVersionTable
50-
- powershell -NoProfile -NoLogo -NonInteractive -Command $PSVersionTable
5171
build: off
5272
test_script:
5373
- bundle exec puppet -V

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@
7979
],
8080
"pdk-version": "1.16.0",
8181
"template-url": "https://github.com/puppetlabs/pdk-templates#master",
82-
"template-ref": "heads/master-0-g5d52853"
82+
"template-ref": "heads/master-0-g88c96ab"
8383
}

provision.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
default:
3+
provisioner: docker
4+
images: ['waffleimage/ubuntu18.04', 'waffleimage/centos7']
5+
vagrant:
6+
provisioner: vagrant
7+
images: ['centos/7', 'generic/ubuntu1804', 'generic/debian8', 'gusztavvargadr/windows-server']
8+
travis_deb:
9+
provisioner: docker
10+
images: ['waffleimage/debian8', 'waffleimage/debian9']
11+
travis_ub:
12+
provisioner: docker
13+
images: ['waffleimage/ubuntu16.04', 'waffleimage/ubuntu18.04']
14+
travis_el:
15+
provisioner: docker
16+
images: ['waffleimage/centos7']
17+
release_checks:
18+
provisioner: vmpooler
19+
images: ['redhat-7-x86_64', 'redhat-8-x86_64', 'centos-7-x86_64', 'centos-8-x86_64', 'ubuntu-1604-x86_64', 'ubuntu-1804-x86_64', 'win-2012r2-x86_64', 'win-2016-core-x86_64', 'win-2019-core-x86_64']

0 commit comments

Comments
 (0)