Skip to content

Commit f90a697

Browse files
Merge pull request #167 from benjamin-robertson/main
Added the ability to set puppet.conf settings via a parameter.
2 parents 589722a + b9af0b1 commit f90a697

31 files changed

+1009
-429
lines changed

.fixtures.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ fixtures:
44
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
55
puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
66
provision: 'https://github.com/puppetlabs/provision.git'
7+
deploy_pe: "https://github.com/jarretlavallee/puppet-deploy_pe"
8+
forge_modules:
9+
ruby_task_helper: "puppetlabs/ruby_task_helper"
10+
stdlib: "puppetlabs/stdlib"
11+
ruby_plugin_helper:
12+
repo: "puppetlabs/ruby_plugin_helper"
13+
ref: "0.2.0"

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "ci"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
workflow_dispatch:
8+
9+
jobs:
10+
Spec:
11+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
12+
with:
13+
runs_on: "ubuntu-20.04"
14+
secrets: "inherit"
15+
16+
Acceptance:
17+
needs: Spec
18+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
19+
with:
20+
runs_on: "ubuntu-20.04"
21+
secrets: "inherit"
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: "integration"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
10+
Integration_linux:
11+
runs-on: ubuntu-22.04
12+
13+
env:
14+
PUPPET_GEM_VERSION: '~> 7.24'
15+
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'
16+
17+
steps:
18+
- name: checkout source
19+
uses: actions/checkout@v4
20+
21+
- name: Activate Ruby 2.7
22+
uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: "2.7"
25+
bundler-cache: true
26+
27+
- name: Print bundle environment
28+
run: |
29+
echo ::group::bundler environment
30+
bundle env
31+
echo ::endgroup::
32+
33+
- name: modify sudo settings
34+
run: |
35+
sudo sed -i 's/Defaults env_reset//' /etc/sudoers
36+
37+
- name: Create the fixtures directory
38+
run: |
39+
bundle exec rake spec_prep
40+
41+
- name: install actual bolt
42+
run: |
43+
wget https://apt.puppet.com/puppet-tools-release-jammy.deb
44+
sudo -E dpkg -i puppet-tools-release-jammy.deb
45+
sudo -E apt-get update
46+
sudo -E apt-get -y install puppet-bolt
47+
sudo -E /usr/local/bin/bolt --modulepath spec/fixtures/modules plan show
48+
49+
- name: install pe
50+
run: |
51+
echo -e 'groups:\n - name: pe\n targets:\n - localhost' > inventory.yaml
52+
sudo -E /usr/local/bin/bolt --modulepath spec/fixtures/modules plan show
53+
sudo -E /usr/local/bin/bolt --modulepath spec/fixtures/modules plan run facts targets=localhost
54+
sudo -E /usr/local/bin/bolt --modulepath spec/fixtures/modules plan run deploy_pe::provision_master targets=localhost version=2021.7.8
55+
56+
- name: run bootstrap task
57+
run: |
58+
curl -k https://localhost:8140/packages/current/install.bash -I
59+
sudo -E /opt/hostedtoolcache/Ruby/2.7.8/x64/bin/bundle exec bolt --modulepath spec/fixtures/modules task run bootstrap --targets localhost master=localhost certname=testing123.com
60+
61+
# Integration_windows: Currently no way to test Windows agent installation.
62+
# runs-on: windows-latest
63+
# env:
64+
# PUPPET_GEM_VERSION: '~> 7.24'
65+
# FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
66+
67+
68+
# steps:
69+
# - name: enable long file path
70+
# run: |
71+
# New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
72+
# - name: checkout source
73+
# uses: actions/checkout@v4
74+
75+
# - name: Activate Ruby 3.2
76+
# uses: ruby/setup-ruby@v1
77+
# with:
78+
# ruby-version: "3.2"
79+
# bundler-cache: true
80+
# cache-version: 1

.github/workflows/labeller.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Labeller
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- labeled
8+
- unlabeled
9+
pull_request_target:
10+
types:
11+
- opened
12+
- labeled
13+
- unlabeled
14+
15+
jobs:
16+
label:
17+
runs-on: ubuntu-latest
18+
steps:
19+
20+
- uses: puppetlabs/[email protected]
21+
name: Label issues or pull requests
22+
with:
23+
label_name: community
24+
label_color: '5319e7'
25+
org_membership: puppetlabs
26+
fail_if_member: 'true'
27+
token: ${{ secrets.IAC_COMMUNITY_LABELER }}

.github/workflows/mend.yml

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

.github/workflows/nightly.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "nightly"
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
Spec:
10+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
11+
with:
12+
runs_on: "ubuntu-20.04"
13+
secrets: "inherit"
14+
15+
Acceptance:
16+
needs: Spec
17+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
18+
with:
19+
runs_on: "ubuntu-20.04"
20+
secrets: "inherit"
21+
22+
Integration:
23+
needs: Spec
24+
uses: "./.github/workflows/integration_test.yml"

.github/workflows/pwsh_lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: "pwsh_lint"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "main"
8+
9+
jobs:
10+
pwsh_lint:
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: enable long file path
15+
run: |
16+
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
17+
18+
- name: checkout source
19+
uses: actions/checkout@v4
20+
21+
- name: install PSScriptAnalyzer
22+
run: |
23+
Install-Module -Name PSScriptAnalyzer -RequiredVersion 1.21.0
24+
Get-InstalledModule
25+
26+
- name: pwsh lint check
27+
run: |
28+
Invoke-ScriptAnalyzer -Recurse -EnableExit -Path .\tasks -ReportSummary

.github/workflows/release.yml

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,9 @@
1-
name: "release"
2-
3-
on:
4-
push:
5-
branches:
6-
- 'release'
1+
name: "Publish module"
72

3+
on:
4+
workflow_dispatch:
5+
86
jobs:
9-
LitmusAcceptance:
10-
env:
11-
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
12-
HONEYCOMB_DATASET: litmus tests
13-
runs-on: self-hosted
14-
strategy:
15-
matrix:
16-
ruby_version: [2.5.x]
17-
puppet_gem_version: [~> 6.0]
18-
platform: [release_checks]
19-
agent_family: ['puppet5', 'puppet6']
20-
21-
steps:
22-
- uses: actions/checkout@v1
23-
- name: Litmus Parallel
24-
uses: puppetlabs/action-litmus_parallel@master
25-
with:
26-
platform: ${{ matrix.platform }}
27-
agent_family: ${{ matrix.agent_family }}
28-
Spec:
29-
runs-on: self-hosted
30-
strategy:
31-
matrix:
32-
check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
33-
ruby_version: [2.5.x]
34-
puppet_gem_version: [~> 5.0, ~> 6.0]
35-
exclude:
36-
- puppet_gem_version: ~> 5.0
37-
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
38-
- ruby_version: 2.5.x
39-
puppet_gem_version: ~> 5.0
40-
steps:
41-
- uses: actions/checkout@v1
42-
- name: Spec Tests
43-
uses: puppetlabs/action-litmus_spec@master
44-
with:
45-
puppet_gem_version: ${{ matrix.puppet_gem_version }}
46-
check: ${{ matrix.check }}
7+
release:
8+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main"
9+
secrets: "inherit"

.github/workflows/release_prep.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Release Prep"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Module version to be released. Must be a valid semver string. (1.2.3)"
8+
required: true
9+
10+
jobs:
11+
release_prep:
12+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main"
13+
with:
14+
version: "${{ github.event.inputs.version }}"
15+
secrets: "inherit"

.github/workflows/weekly.yml

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

0 commit comments

Comments
 (0)