Skip to content

Commit 5f7f779

Browse files
committed
feat: add ci to publish to Puppet forge and linter checks
1 parent f2c72ec commit 5f7f779

File tree

5 files changed

+120
-105
lines changed

5 files changed

+120
-105
lines changed

.github/workflows/deploy.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build and publish to Puppet Forge
2+
3+
on:
4+
push:
5+
tags:
6+
- v[0-9]+.[0-9]+.[0-9]+
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Get latest tag
13+
id: vars
14+
run: echo "{tag}=${GITHUB_REF:10}" >> $GITHUB_OUTPUT
15+
- name: Clone repository
16+
uses: actions/checkout@v4.1.1
17+
with:
18+
ref: ${{ steps.vars.outputs.tag }}
19+
- name: Build and publish module
20+
uses: barnumbirr/action-forge-publish@v2.15.0
21+
env:
22+
FORGE_API_KEY: ${{ secrets.FORGE_API_KEY }}
23+
REPOSITORY_URL: https://forgeapi.puppet.com/v3/releases

.github/workflows/puppet-lint.yml

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,17 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
# Puppet Lint tests Puppet code against the recommended Puppet language style guide.
6-
# https://puppet.com/docs/puppet/7/style_guide.html
7-
# Puppet Lint validates only code style; it does not validate syntax.
8-
# To test syntax, use Puppet's puppet parser validate command.
9-
# More details at https://github.com/puppetlabs/puppet-lint/
1+
name: Puppet Lint
102

11-
name: puppet-lint
12-
13-
on:
14-
push:
15-
branches: [ "main" ]
16-
pull_request:
17-
# The branches below must be a subset of the branches above
18-
branches: [ "main" ]
19-
schedule:
20-
- cron: '27 0 * * 4'
21-
22-
permissions:
23-
contents: read
3+
on: [push]
244

255
jobs:
266
puppet-lint:
27-
name: Run puppet-lint scanning
7+
288
runs-on: ubuntu-latest
29-
permissions:
30-
contents: read # for checkout to fetch code
31-
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
32-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
339

3410
steps:
35-
- name: Checkout code
36-
uses: actions/checkout@v4
37-
38-
- name: Setup Ruby
39-
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
40-
with:
41-
ruby-version: 2.7
42-
bundler-cache: true
43-
44-
- name: Install puppet-lint
45-
run: gem install puppet-lint
46-
47-
- name: Run puppet-lint
48-
run: puppet-lint . --sarif > puppet-lint-results.sarif
49-
continue-on-error: true
11+
- name: Checkout
12+
uses: actions/checkout@v4
5013

51-
- name: Upload analysis results to GitHub
52-
uses: github/codeql-action/upload-sarif@v3
53-
with:
54-
sarif_file: puppet-lint-results.sarif
55-
wait-for-processing: true
14+
- name: puppet-lint
15+
uses: scottbrenner/puppet-lint-action@v1.0.7
16+
with:
17+
args: ./manifests

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Changelog
2+
3+
## v0.4.2 - Compatible with Puppet from 6.24 up to, but not including, 8.0
4+
5+
### What's Changed
6+
7+
* Lookup osfamily for RedHat clones by @msalway in <https://github.com/lvicainne/puppet-opendkim/pull/43>
8+
* Missing Optional for autorestart by @msalway in <https://github.com/lvicainne/puppet-opendkim/pull/44>
9+
* chore: update module version and metadata by @parveenk27 in <https://github.com/lvicainne/puppet-opendkim/pull/54>
10+
* Chunking publickey in 255 char blocks for dns txt by @cruelsmith in <https://github.com/lvicainne/puppet-opendkim/pull/51>
11+
* Add SignHeaders From by @seriv in <https://github.com/lvicainne/puppet-opendkim/pull/48>
12+
* feat(pdk): enable pdk to improve test and reliability of the module by @lvicainne in <https://github.com/lvicainne/puppet-opendkim/pull/55>
13+
14+
### New Contributors
15+
16+
* @parveenk27 made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/54>
17+
* @seriv made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/48>
18+
19+
**Full Changelog**: <https://github.com/lvicainne/puppet-opendkim/compare/v0.4.0...v0.4.2>
20+
21+
## v0.4.0
22+
23+
### What's Changed
24+
25+
* Add Missing Socket for Ubuntu 16.04 by @HielkeJ in <https://github.com/lvicainne/puppet-opendkim/pull/3>
26+
* Replace deprecated stdlib functions with puppet data types by @jkroepke in <https://github.com/lvicainne/puppet-opendkim/pull/5>
27+
* Removed full path comments on configfile by @jkroepke in <https://github.com/lvicainne/puppet-opendkim/pull/6>
28+
* Adding nameserver config paramter by @jkroepke in <https://github.com/lvicainne/puppet-opendkim/pull/7>
29+
* if you default it to undef in params, you need to make it Optional to acce… by @qs5779 in <https://github.com/lvicainne/puppet-opendkim/pull/8>
30+
* add force to directory absent resources by @qs5779 in <https://github.com/lvicainne/puppet-opendkim/pull/9>
31+
* Add parameters: mode, canonicalization, removeoldsignatures by @sa5bke in <https://github.com/lvicainne/puppet-opendkim/pull/12>
32+
* Add support for MaximumSignedBytes by @tetsuo13 in <https://github.com/lvicainne/puppet-opendkim/pull/13>
33+
* Make sure to create users before package installation by @Arakmar in <https://github.com/lvicainne/puppet-opendkim/pull/14>
34+
* Allow handling of private keys outsite puppet by @jeebiq in <https://github.com/lvicainne/puppet-opendkim/pull/18>
35+
* Test bumping version by @cFire in <https://github.com/lvicainne/puppet-opendkim/pull/17>
36+
* add ability to validate dnssec by @tobiWu in <https://github.com/lvicainne/puppet-opendkim/pull/19>
37+
* Fix duplicate resource if multiple keys are added for a domain by @nikdoof in <https://github.com/lvicainne/puppet-opendkim/pull/16>
38+
* make trustanchorfile optional by @antondollmaier in <https://github.com/lvicainne/puppet-opendkim/pull/20>
39+
* Add support for FreeBSD by @smortex in <https://github.com/lvicainne/puppet-opendkim/pull/21>
40+
* Add management of /etc/tmpfiles.d/opendkim.conf for RedHat by @razorbladex401 in <https://github.com/lvicainne/puppet-opendkim/pull/22>
41+
* Allow to apply a DKIM cert on all domains by @kapouik in <https://github.com/lvicainne/puppet-opendkim/pull/24>
42+
* Allow stdlib v8 by @sazzle2611 in <https://github.com/lvicainne/puppet-opendkim/pull/25>
43+
* Allow private keys to be Deferred for use with node_encrypt by @msalway in <https://github.com/lvicainne/puppet-opendkim/pull/28>
44+
* Add SenderHeaders option to opendkim.conf by @tallenaz in <https://github.com/lvicainne/puppet-opendkim/pull/29>
45+
* Fix legacy fact usage by @smortex in <https://github.com/lvicainne/puppet-opendkim/pull/30>
46+
* Adds Parameters to support 2048 bit keys and Specifying hash_algorithms by @razorbladex401 in <https://github.com/lvicainne/puppet-opendkim/pull/31>
47+
* Rework module to hiera and epp templates by @cruelsmith in <https://github.com/lvicainne/puppet-opendkim/pull/35>
48+
* chore(puppet): update module version and metadata by @lvicainne in <https://github.com/lvicainne/puppet-opendkim/pull/36>
49+
* Fix default value for sysconfigfile by @smortex in <https://github.com/lvicainne/puppet-opendkim/pull/37>
50+
* Edit file ownership and permissions by @tallenaz in <https://github.com/lvicainne/puppet-opendkim/pull/41>
51+
* Add autorestart config by @coreone in <https://github.com/lvicainne/puppet-opendkim/pull/42>
52+
53+
## New Contributors
54+
55+
* @HielkeJ made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/3>
56+
* @jkroepke made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/5>
57+
* @qs5779 made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/8>
58+
* @sa5bke made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/12>
59+
* @tetsuo13 made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/13>
60+
* @Arakmar made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/14>
61+
* @jeebiq made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/18>
62+
* @cFire made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/17>
63+
* @tobiWu made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/19>
64+
* @nikdoof made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/16>
65+
* @antondollmaier made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/20>
66+
* @smortex made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/21>
67+
* @razorbladex401 made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/22>
68+
* @kapouik made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/24>
69+
* @sazzle2611 made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/25>
70+
* @tallenaz made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/29>
71+
* @coreone made their first contribution in <https://github.com/lvicainne/puppet-opendkim/pull/42>
72+
73+
**Full Changelog**: <https://github.com/lvicainne/puppet-opendkim/commits/v0.4.0>

README.md

Lines changed: 14 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ Warning : this package will replace all your RSA keys ! Before using it, be sure
3434
A basic example is as follows:
3535

3636
```puppet
37-
class { '::opendkim':
38-
socket => 'inet:8891@127.0.0.1',
39-
trusted_hosts => ['::1','127.0.0.1','localhost'],
40-
keys => [
41-
{
42-
domain => 'mydomain.com',
43-
selector => 'default',
44-
publickey => 'p=yourPublicKey',
45-
privatekey => 'Your Private Key',
46-
signingdomains => ['*@mydomain.com', '*@subdomain.mydomain.com'],
47-
}
48-
]
49-
}
37+
class { '::opendkim':
38+
socket => 'inet:8891@127.0.0.1',
39+
trusted_hosts => ['::1','127.0.0.1','localhost'],
40+
keys => [
41+
{
42+
domain => 'mydomain.com',
43+
selector => 'default',
44+
publickey => 'p=yourPublicKey',
45+
privatekey => 'Your Private Key',
46+
signingdomains => ['*@mydomain.com', '*@subdomain.mydomain.com'],
47+
}
48+
]
49+
}
5050
```
5151

5252
## Usage
5353

5454
You can also use natively Hiera :
5555

5656
```puppet
57-
include ::opendkim
57+
include ::opendkim
5858
```
5959

6060
```yaml
@@ -152,46 +152,3 @@ This module has only been tested on my Debian and Centos servers. I can not guar
152152
## Development
153153

154154
You are pleased to fork this module and adapt it for you needs. I am open to any Pull Request :-)
155-
156-
## Release Notes/Contributors/Etc
157-
158-
### v0.4 - Compatible with Puppet from 6.24 up to, but not including, 8.0
159-
160-
* v0.4.2 Add PDK dependancies
161-
Add SignHeaders From
162-
Chunking publickey in 255 char blocks for dns txt
163-
* v0.4.1 Fix version in metadata.json
164-
* v0.4.0 Add autorestart config
165-
Lookup for OS Family facts in Hiera
166-
Use var opendkim::user as the owner of files
167-
Fix: Set default value for var opendkim::sysconfigfile
168-
Set show_diff to false for all private key resources
169-
170-
### v0.3 - Compatible with Puppet from 6.4 to newer
171-
172-
* v0.3.0 Correct a bug about an optional parameter
173-
174-
### v0.2 - Compatible with Puppet from 4.8 to 6.3
175-
176-
* v0.2.9 Correct a bug about an optional parameter
177-
* v0.2.8 Add features from Pull Requests
178-
* v0.2.7 Add parameter maximum_signed_bytes
179-
* v0.2.6 Add parameters: mode, canonicalization, removeoldsignatures
180-
* v0.2.5 Make uid and gid not required any more to be defined
181-
* v0.2.4 Correction of the default directory for CentOs : from /etc/dkim to /etc/opendkim
182-
* v0.2.3 Minor changes and corrections about empty values
183-
184-
### v0.1 - Compatible with Puppet up to 4.6
185-
186-
* v0.1.2 Virtual version (same as v0.1.0 but with bugfix about requirements and puppet version required)
187-
* v0.1.1 Use newer implementations of Puppet (v4.8 and newer).
188-
* v0.1.0 Replace deprecated stdlib functions with puppet data types
189-
* v0.0.9 Correct some dependencies
190-
* v0.0.8 Closes #1 (SystemD with inline comments)
191-
* v0.0.7 Rename repository
192-
* v0.0.6 Support Umask variabilization in order to use UNIX sockets
193-
* v0.0.5 Add the homedir parameter
194-
* v0.0.4 Ensure the pidfile directory exists
195-
* v0.0.3 Improve some documentation parts
196-
* v0.0.2 Improve some documentation parts
197-
* v0.0.1 First Running version

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lvicainne-opendkim",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"author": "lvicainne,cruelsmith",
55
"summary": "Manage an OpenDKIM configuration",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)