Skip to content

Commit 069035a

Browse files
authored
Puppet 8 support (#163)
* pdk update * lint fixes and params validation * updated major version * more lints * removed .project * Fixed fixtures * pdk convert + tests * Working on spec testds * spec refines * Test data * More fixes * Fix datatype * Fix data type * Fixing tests * Array typecast * .. * tt * fixing * Another test * More spec fixing * Final fixes * Last?
1 parent 5f8d228 commit 069035a

File tree

119 files changed

+2979
-1681
lines changed

Some content is hidden

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

119 files changed

+2979
-1681
lines changed

.fixtures.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
fixtures:
22
repositories:
3-
"concat": "git://github.com/puppetlabs/puppetlabs-concat.git"
4-
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
5-
symlinks:
6-
"puppi": "#{source_dir}"
3+
"stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib.git"
4+
"concat": "https://github.com/puppetlabs/puppetlabs-concat.git"

.github/workflows/codeql-analysis.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '38 21 * * 1'
22+
23+
24+
jobs:
25+
analyze:
26+
name: Analyze
27+
runs-on: ubuntu-latest
28+
permissions:
29+
actions: read
30+
contents: read
31+
security-events: write
32+
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
language: [ 'ruby' ]
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v3
41+
42+
# Initializes the CodeQL tools for scanning.
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@v2
45+
with:
46+
languages: ${{ matrix.language }}
47+
# If you wish to specify custom queries, you can do so here or in a config file.
48+
# By default, queries listed here will override any specified in a config file.
49+
# Prefix the list here with "+" to use these queries and those in the config file.
50+
51+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
52+
# queries: security-extended,security-and-quality
53+
54+
55+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56+
# If this step fails, then you should remove it and run the build manually (see below)
57+
- name: Autobuild
58+
uses: github/codeql-action/autobuild@v2
59+
60+
# ℹ️ Command-line programs to run using the OS shell.
61+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
62+
63+
# If the Autobuild fails above, remove it and uncomment the following three lines.
64+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
65+
66+
# - run: |
67+
# echo "Run, Build Application using script"
68+
# ./location_of_script_within_repo/buildscript.sh
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v2

.github/workflows/pr.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: PR tests
3+
4+
on: pull_request
5+
6+
jobs:
7+
static:
8+
name: 'Syntax validation'
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
container: puppet/pdk:3.3.0.0
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Run static validations
15+
run: /usr/local/bin/pdk bundle exec rake validate lint check
16+
env:
17+
BUNDLE_WITHOUT: development:system_tests:release
18+
19+
unit:
20+
name: 'Unit tests'
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 60
23+
# container: puppet/puppet-dev-tools:4.x
24+
container: puppet/pdk:3.3.0.0
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Run unit tests on Puppet 8
28+
run: /usr/local/bin/pdk test unit --puppet-version=8
29+
env:
30+
BUNDLE_WITHOUT: development:system_tests:release
31+
continue-on-error: true
32+
- name: Run unit tests on Puppet 7
33+
run: /usr/local/bin/pdk test unit --puppet-version=7
34+
env:
35+
BUNDLE_WITHOUT: development:system_tests:release
36+
continue-on-error: true
37+
38+
unit_legacy:
39+
name: 'Unit tests Legacy Puppet'
40+
runs-on: ubuntu-latest
41+
timeout-minutes: 60
42+
container: puppet/puppet-dev-tools:4.x
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Run unit tests on Puppet 6
46+
run: /usr/local/bin/pdk test unit --puppet-version=6
47+
env:
48+
BUNDLE_WITHOUT: development:system_tests:release
49+
continue-on-error: true

.github/workflows/release.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Release
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
env:
10+
BUNDLE_WITHOUT: development:test:system_tests
11+
12+
jobs:
13+
deploy:
14+
name: 'Deploy to forge'
15+
runs-on: ubuntu-latest
16+
if: github.repository_owner == 'example42'
17+
container: puppet/pdk:3.3.0.0
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
- name: "PDK Build"
22+
uses: docker://puppet/pdk:3.3.0.0
23+
with:
24+
args: 'build'
25+
- name: "Push to Forge"
26+
uses: docker://puppet/pdk:3.3.0.0
27+
with:
28+
args: 'release publish --forge-token ${{ secrets.PUPPET_FORGE_API_KEY }} --force'
29+

.gitignore

+12-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,20 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
26+
.project
27+
.envrc
28+
/inventory.yaml
29+
/spec/fixtures/litmus_inventory.yaml
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log

.pdkignore

+28-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,36 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
26+
.project
27+
.envrc
28+
/inventory.yaml
29+
/spec/fixtures/litmus_inventory.yaml
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log
36+
/.fixtures.yml
37+
/Gemfile
38+
/.gitattributes
39+
/.github/
40+
/.gitignore
41+
/.pdkignore
42+
/.puppet-lint.rc
43+
/Rakefile
44+
/rakelib/
45+
/.rspec
46+
/..yml
47+
/.yardopts
48+
/spec/
49+
/.vscode/
50+
/.sync.yml
51+
/.devcontainer/

.project

-23
This file was deleted.

.puppet-lint.rc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--relative
2+
--no-parameter_documentation
3+
--no-params_empty_string

0 commit comments

Comments
 (0)