Skip to content

Commit c4cd5aa

Browse files
authored
Merge pull request #283 from puppetlabs/CONT-745-add_module_support
(CONT-974) - Add puppet module support
2 parents 5c4d044 + ebe7cec commit c4cd5aa

File tree

121 files changed

+1965
-4600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1965
-4600
lines changed

.fixtures.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
fixtures:
22
repositories:
3-
'facts': 'git://github.com/puppetlabs/puppetlabs-facts.git'
4-
'provision': "git://github.com/puppetlabs/provision.git"
5-
'puppet_agent': 'git://github.com/puppetlabs/puppetlabs-puppet_agent.git'
6-
'stdlib': "https://github.com/puppetlabs/puppetlabs-stdlib.git"
7-
forge_modules:
8-
'mount_core': "puppetlabs/mount_core"
9-
symlinks:
10-
'lvm': "#{source_dir}"
3+
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
4+
provision: "https://github.com/puppetlabs/provision.git"
5+
puppet_agent:
6+
repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
7+
ref: v4.13.0
8+
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
9+
mount_core: "https://github.com/puppetlabs/puppetlabs-mount_core.git"

.github/workflows/auto_release.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: "ci"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
workflow_dispatch:
8+
9+
jobs:
10+
Spec:
11+
name: "Spec tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix: ${{ fromJson( vars.spec_matrix ) }}
16+
17+
env:
18+
PUPPET_GEM_VERSION: ${{ matrix.puppet_version }}
19+
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
20+
21+
steps:
22+
- name: "Checkout"
23+
uses: "actions/checkout@v3"
24+
25+
- name: "Setup ruby"
26+
uses: "ruby/setup-ruby@v1"
27+
with:
28+
ruby-version: ${{matrix.ruby_version}}
29+
bundler-cache: true
30+
31+
- name: "Bundle environment"
32+
run: |
33+
bundle env
34+
35+
- name: "Run Static & Syntax Tests"
36+
run: |
37+
bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
38+
39+
- name: "Run tests"
40+
run: |
41+
bundle exec rake parallel_spec
42+
43+
Acceptance:
44+
name: "Acceptance tests (${{matrix.platforms.label}}, ${{matrix.collection}})"
45+
needs: Spec
46+
runs-on: ubuntu-latest
47+
strategy:
48+
fail-fast: false
49+
matrix: ${{ fromJson( vars.matrix ) }}
50+
51+
env:
52+
PUPPET_GEM_VERSION: '~> 7.24'
53+
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
54+
55+
steps:
56+
57+
- name: "Checkout"
58+
uses: "actions/checkout@v3"
59+
60+
- name: "Setup ruby"
61+
uses: "ruby/setup-ruby@v1"
62+
with:
63+
ruby-version: "2.7"
64+
bundler-cache: true
65+
66+
- name: "Bundle environment"
67+
run: |
68+
bundle env
69+
70+
- name: "Provision environment"
71+
run: |
72+
bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]"
73+
# Redact password
74+
FILE='spec/fixtures/litmus_inventory.yaml'
75+
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
76+
77+
- name: "Install Puppet agent"
78+
run: |
79+
bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
80+
81+
- name: "Install module"
82+
run: |
83+
bundle exec rake 'litmus:install_module'
84+
85+
- name: "Authenticate to GCP"
86+
run: |
87+
echo '${{ secrets.GCP_CONNECTION }}' >> creds.json
88+
bundle exec bolt file upload creds.json creds.json -t ssh_nodes -i spec/fixtures/litmus_inventory.yaml
89+
bundle exec bolt command run "gcloud auth activate-service-account --key-file creds.json" -t ssh_nodes -i spec/fixtures/litmus_inventory.yaml
90+
91+
- name: "Run acceptance tests"
92+
run: |
93+
bundle exec rake 'litmus:acceptance:parallel'
94+
95+
- name: "Remove test environment"
96+
if: ${{ always() }}
97+
continue-on-error: true
98+
run: |
99+
bundle exec rake 'litmus:tear_down'

.github/workflows/mend.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "mend"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
schedule:
8+
- cron: "0 0 * * *"
9+
workflow_dispatch:
10+
11+
jobs:
12+
13+
mend:
14+
uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main"
15+
secrets: "inherit"

.github/workflows/nightly.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: "nightly"
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
Spec:
10+
name: "Spec tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix: ${{ fromJson( vars.spec_matrix ) }}
15+
16+
env:
17+
PUPPET_GEM_VERSION: ${{ matrix.puppet_version }}
18+
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
19+
20+
steps:
21+
- name: "Checkout"
22+
uses: "actions/checkout@v3"
23+
24+
- name: "Setup ruby"
25+
uses: "ruby/setup-ruby@v1"
26+
with:
27+
ruby-version: ${{matrix.ruby_version}}
28+
bundler-cache: true
29+
30+
- name: "Bundle environment"
31+
run: |
32+
bundle env
33+
34+
- name: "Run Static & Syntax Tests"
35+
run: |
36+
bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
37+
38+
- name: "Run tests"
39+
run: |
40+
bundle exec rake parallel_spec
41+
42+
Acceptance:
43+
name: "Acceptance tests (${{matrix.platforms.label}}, ${{matrix.collection}})"
44+
needs: Spec
45+
runs-on: ubuntu-latest
46+
strategy:
47+
fail-fast: false
48+
matrix: ${{ fromJson( vars.matrix ) }}
49+
50+
env:
51+
PUPPET_GEM_VERSION: '~> 7.24'
52+
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
53+
54+
steps:
55+
56+
- name: "Checkout"
57+
uses: "actions/checkout@v3"
58+
59+
- name: "Setup ruby"
60+
uses: "ruby/setup-ruby@v1"
61+
with:
62+
ruby-version: "2.7"
63+
bundler-cache: true
64+
65+
- name: "Bundle environment"
66+
run: |
67+
bundle env
68+
69+
- name: "Provision environment"
70+
run: |
71+
bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]"
72+
# Redact password
73+
FILE='spec/fixtures/litmus_inventory.yaml'
74+
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
75+
76+
- name: "Install Puppet agent"
77+
run: |
78+
bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
79+
80+
- name: "Install module"
81+
run: |
82+
bundle exec rake 'litmus:install_module'
83+
84+
- name: "Authenticate to GCP"
85+
run: |
86+
echo ${{ secrets.GCP_CONNECTION }} > creds.json
87+
bundle exec bolt file upload creds.json creds.json -t ssh_nodes -i spec/fixtures/litmus_inventory.yaml
88+
bundle exec bolt command run "gcloud auth activate-service-account --key-file creds.json" -t ssh_nodes -i spec/fixtures/litmus_inventory.yaml
89+
90+
- name: "Run acceptance tests"
91+
run: |
92+
bundle exec rake 'litmus:acceptance:parallel'
93+
94+
- name: "Remove test environment"
95+
if: ${{ always() }}
96+
continue-on-error: true
97+
run: |
98+
bundle exec rake 'litmus:tear_down'

0 commit comments

Comments
 (0)