Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit 4b99dc9

Browse files
authored
Merge pull request #25 from LDaneliukas/update_pdk
Hieradata, pdk, workflow update
2 parents a4eb316 + 7b1d8df commit 4b99dc9

File tree

15 files changed

+515
-85
lines changed

15 files changed

+515
-85
lines changed

.devcontainer/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM puppet/pdk:latest
2+
3+
# [Optional] Uncomment this section to install additional packages.
4+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5+
# && apt-get -y install --no-install-recommends <your-package-list-here>
6+

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
3+
{
4+
"name": "Puppet Development Kit (Community)",
5+
"dockerFile": "Dockerfile",
6+
7+
// Set *default* container specific settings.json values on container create.
8+
"settings": {
9+
"terminal.integrated.shell.linux": "/bin/bash"
10+
},
11+
12+
// Add the IDs of extensions you want installed when the container is created.
13+
"extensions": [
14+
"puppet.puppet-vscode",
15+
"rebornix.Ruby"
16+
]
17+
18+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19+
// "forwardPorts": [],
20+
21+
// Use 'postCreateCommand' to run commands after the container is created.
22+
// "postCreateCommand": "pdk --version",
23+
}

.github/workflows/pdk-test-unit.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@ on:
77

88
jobs:
99
validating:
10-
runs-on: self-hosted-novum
10+
runs-on: [self-hosted-novum, self-hosted, linux]
11+
strategy:
12+
matrix:
13+
puppet-version: [5, 6, 7]
1114
steps:
1215
- name: Clone repository
1316
uses: actions/checkout@v2
1417

1518
- name: Run pdk validate
1619
uses: puppets-epic-show-theatre/action-pdk-validate@v1
1720
with:
18-
# [optional]
19-
# A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
20-
puppet-version: "5.5"
21+
puppet-version: ${{ matrix.puppet-version }}
2122

2223
testing:
23-
runs-on: self-hosted-novum
24+
runs-on: [self-hosted-novum, self-hosted, linux]
25+
strategy:
26+
matrix:
27+
puppet-version: [5, 6, 7]
2428
if: always()
2529
needs:
2630
- validating
@@ -32,6 +36,4 @@ jobs:
3236
uses: puppets-epic-show-theatre/action-pdk-test-unit@v1
3337
# added because there are open ended dependencies version requirements in metadata.json
3438
with:
35-
# [optional]
36-
# A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
37-
puppet-version: "5.5"
39+
puppet-version: ${{ matrix.puppet-version }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
.project
2626
.envrc
2727
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml

.gitlab-ci.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@ stages:
33
- syntax
44
- unit
55

6-
cache:
7-
paths:
8-
- vendor/bundle
6+
default:
7+
cache:
8+
paths:
9+
- vendor/bundle
910

10-
before_script:
11-
- bundle -v
12-
- rm Gemfile.lock || true
13-
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
14-
- "# Set `rubygems_version` in the .sync.yml to set a value"
15-
- "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
16-
- '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
17-
- gem --version
18-
- bundle -v
19-
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
11+
before_script: &before_script
12+
- bundle -v
13+
- rm Gemfile.lock || true
14+
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
15+
- "# Set `rubygems_version` in the .sync.yml to set a value"
16+
- "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
17+
- '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
18+
- gem --version
19+
- bundle -v
20+
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
2021

2122
syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.7-Puppet ~> 6:
2223
stage: syntax
@@ -34,11 +35,19 @@ parallel_spec-Ruby 2.5.7-Puppet ~> 6:
3435
variables:
3536
PUPPET_GEM_VERSION: '~> 6'
3637

37-
parallel_spec-Ruby 2.4.5-Puppet ~> 5:
38+
syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.7.2-Puppet ~> 7:
39+
stage: syntax
40+
image: ruby:2.7.2
41+
script:
42+
- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
43+
variables:
44+
PUPPET_GEM_VERSION: '~> 7'
45+
46+
parallel_spec-Ruby 2.7.2-Puppet ~> 7:
3847
stage: unit
39-
image: ruby:2.4.5
48+
image: ruby:2.7.2
4049
script:
4150
- bundle exec rake parallel_spec
4251
variables:
43-
PUPPET_GEM_VERSION: '~> 5'
52+
PUPPET_GEM_VERSION: '~> 7'
4453

.pdkignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@
2525
.project
2626
.envrc
2727
/inventory.yaml
28+
/spec/fixtures/litmus_inventory.yaml
2829
/appveyor.yml
30+
/.editorconfig
2931
/.fixtures.yml
3032
/Gemfile
3133
/.gitattributes
3234
/.gitignore
3335
/.gitlab-ci.yml
3436
/.pdkignore
37+
/.puppet-lint.rc
3538
/Rakefile
3639
/rakelib/
3740
/.rspec
@@ -40,3 +43,5 @@
4043
/.yardopts
4144
/spec/
4245
/.vscode/
46+
/.sync.yml
47+
/.devcontainer/

0 commit comments

Comments
 (0)