Skip to content

Commit d9fac4d

Browse files
Merge branch 'main' into fix/xtrabackup-package-ensure-absent
2 parents 9bab315 + d07add1 commit d9fac4d

30 files changed

Lines changed: 292 additions & 289 deletions

File tree

.fixtures.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ fixtures:
66
"provision": "https://github.com/puppetlabs/provision.git"
77
puppet_agent:
88
repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
9-
ref: v4.21.0

.github/workflows/ci.yml

Lines changed: 24 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -4,105 +4,34 @@ on:
44
pull_request:
55
branches:
66
- "main"
7+
pull_request_target:
8+
types: [labeled, reopened]
9+
branches:
10+
- "main"
711
workflow_dispatch:
8-
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
920
jobs:
1021
Spec:
22+
if: github.event_name != 'pull_request_target'
1123
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
12-
with:
13-
runs_on: "ubuntu-24.04"
1424
secrets: "inherit"
1525

16-
setup_matrix:
17-
name: "Setup Test Matrix"
18-
needs: "Spec"
19-
runs-on: ubuntu-24.04
20-
outputs:
21-
matrix: ${{ steps.get-matrix.outputs.matrix }}
22-
23-
steps:
24-
- name: Checkout Source
25-
uses: actions/checkout@v3
26-
27-
- name: Activate Ruby 3.1
28-
uses: ruby/setup-ruby@v1
29-
with:
30-
ruby-version: "3.1"
31-
bundler-cache: true
32-
33-
- name: Print bundle environment
34-
run: |
35-
echo ::group::bundler environment
36-
bundle env
37-
echo ::endgroup::
38-
39-
- name: Setup Acceptance Test Matrix
40-
id: get-matrix
41-
run: |
42-
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]'
43-
4426
Acceptance:
45-
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
46-
needs:
47-
- setup_matrix
48-
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
49-
50-
runs-on: ubuntu-24.04
51-
strategy:
52-
fail-fast: false
53-
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
54-
55-
env:
56-
PUPPET_GEM_VERSION: '~> 7.24'
57-
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'
58-
59-
steps:
60-
- name: "Install Twingate"
61-
uses: "twingate/github-action@v1"
62-
with:
63-
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
64-
65-
- name: Checkout Source
66-
uses: actions/checkout@v3
67-
68-
- name: Activate Ruby 3.1
69-
uses: ruby/setup-ruby@v1
70-
with:
71-
ruby-version: "3.1"
72-
bundler-cache: true
73-
74-
- name: Print bundle environment
75-
run: |
76-
bundle env
77-
78-
- name: "Disable mysqld apparmor profile"
79-
if: ${{matrix.platforms.provider == 'docker'}}
80-
run: |
81-
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
82-
sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld
83-
sudo systemctl disable apparmor
84-
sudo systemctl stop apparmor
85-
86-
- name: Provision test environment
87-
run: |
88-
bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
89-
FILE='spec/fixtures/litmus_inventory.yaml'
90-
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
91-
92-
- name: Install agent
93-
run: |
94-
bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
95-
96-
- name: Install module
97-
run: |
98-
bundle exec rake 'litmus:install_module'
99-
100-
- name: Run acceptance tests
101-
run: |
102-
bundle exec rake 'litmus:acceptance:parallel'
103-
104-
- name: Remove test environment
105-
if: ${{ always() }}
106-
continue-on-error: true
107-
run: |
108-
bundle exec rake 'litmus:tear_down'
27+
if: >-
28+
github.event_name == 'workflow_dispatch' ||
29+
(github.event_name == 'pull_request' &&
30+
github.event.pull_request.head.repo.fork == false) ||
31+
(github.event_name == 'pull_request_target' &&
32+
github.event.pull_request.head.repo.fork == true &&
33+
contains(github.event.pull_request.labels.*.name, 'allowed-for-ci'))
34+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
35+
with:
36+
flags: "--nightly --platform-exclude centos-7 --platform-exclude scientific-7 --platform-exclude oraclelinux-7 --platform-exclude almalinux-8 --arch-exclude arm"
37+
secrets: "inherit"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Fork CI Label Guard"
2+
3+
on:
4+
pull_request_target:
5+
types: [synchronize, closed]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
strip:
12+
uses: "puppetlabs/cat-github-actions/.github/workflows/fork_ci_label_guard.yml@main"

.github/workflows/nightly.yml

Lines changed: 5 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -8,100 +8,11 @@ on:
88
jobs:
99
Spec:
1010
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
11-
with:
12-
runs_on: "ubuntu-24.04"
1311
secrets: "inherit"
1412

15-
setup_matrix:
16-
name: "Setup Test Matrix"
17-
needs: "Spec"
18-
runs-on: ubuntu-24.04
19-
outputs:
20-
matrix: ${{ steps.get-matrix.outputs.matrix }}
21-
22-
steps:
23-
- name: Checkout Source
24-
uses: actions/checkout@v3
25-
26-
- name: Activate Ruby 3.1
27-
uses: ruby/setup-ruby@v1
28-
with:
29-
ruby-version: "3.1"
30-
bundler-cache: true
31-
32-
- name: Print bundle environment
33-
run: |
34-
echo ::group::bundler environment
35-
bundle env
36-
echo ::endgroup::
37-
38-
- name: Setup Acceptance Test Matrix
39-
id: get-matrix
40-
run: |
41-
bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]'
42-
4313
Acceptance:
44-
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
45-
needs:
46-
- setup_matrix
47-
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
48-
49-
runs-on: ubuntu-24.04
50-
strategy:
51-
fail-fast: false
52-
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
53-
54-
env:
55-
PUPPET_GEM_VERSION: '~> 7.24'
56-
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'
57-
58-
steps:
59-
- name: "Install Twingate"
60-
uses: "twingate/github-action@v1"
61-
with:
62-
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
63-
64-
- name: Checkout Source
65-
uses: actions/checkout@v3
66-
67-
- name: Activate Ruby 3.1
68-
uses: ruby/setup-ruby@v1
69-
with:
70-
ruby-version: "3.1"
71-
bundler-cache: true
72-
73-
- name: Print bundle environment
74-
run: |
75-
bundle env
76-
77-
- name: "Disable mysqld apparmor profile"
78-
if: ${{matrix.platforms.provider == 'docker'}}
79-
run: |
80-
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
81-
sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld
82-
sudo systemctl disable apparmor
83-
sudo systemctl stop apparmor
84-
85-
- name: Provision test environment
86-
run: |
87-
bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
88-
FILE='spec/fixtures/litmus_inventory.yaml'
89-
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
90-
91-
- name: Install agent
92-
run: |
93-
bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
94-
95-
- name: Install module
96-
run: |
97-
bundle exec rake 'litmus:install_module'
98-
99-
- name: Run acceptance tests
100-
run: |
101-
bundle exec rake 'litmus:acceptance:parallel'
102-
103-
- name: Remove test environment
104-
if: ${{ always() }}
105-
continue-on-error: true
106-
run: |
107-
bundle exec rake 'litmus:tear_down'
14+
needs: Spec
15+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
16+
with:
17+
flags: "--nightly --platform-exclude centos-7 --platform-exclude scientific-7 --platform-exclude oraclelinux-7 --platform-exclude almalinux-8 --arch-exclude arm"
18+
secrets: "inherit"

.puppet-lint.rc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
--fail-on-warnings
12
--relative
3+
--no-80chars-check
4+
--no-140chars-check
5+
--no-class_inherits_from_params_class-check
6+
--no-autoloader_layout-check
7+
--no-documentation-check
8+
--no-single_quote_string_with_variables-check
29
--no-anchor_resource-check
310
--no-params_empty_string_assignment-check
11+
--ignore-paths=.vendor/**/*.pp,.bundle/**/*.pp,pkg/**/*.pp,spec/**/*.pp,tests/**/*.pp,types/**/*.pp,vendor/**/*.pp

0 commit comments

Comments
 (0)