From de1f1aac1542836fe78feb772c5ac963fdbd8b5a Mon Sep 17 00:00:00 2001 From: Jonathan Gazeley Date: Sun, 10 Apr 2022 21:04:48 +0100 Subject: [PATCH 1/5] Add tests using puppets-epic-show-theatre Github actions Previously tested was https://github.com/mysociety/action-pdk, which didn't offer as much functionality, and didn't run `pdk validate`. --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..4b39db11 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Run PDK tests + +on: + - push + - pull_request + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run unit tests + uses: puppets-epic-show-theatre/action-pdk-test-unit@v1 + with: + puppet-version: "" + # [optional] + # A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5". + pe-version: "" + # [optional] + # A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1". + validate: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run PDK validate + uses: puppets-epic-show-theatre/action-pdk-validate@v1 + with: + puppet-version: "" + # [optional] + # A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5". + pe-version: "" + # [optional] + # A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1". From d1bd9678b6eb1fdac656b2569eaa89a5a0cb121c Mon Sep 17 00:00:00 2001 From: Jonathan Gazeley Date: Sun, 10 Apr 2022 20:57:14 +0100 Subject: [PATCH 2/5] Prefer single-quoted strings when you don't need string interpolation or special symbols. --- spec/defines/client_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/defines/client_spec.rb b/spec/defines/client_spec.rb index acdc4657..28ce2102 100644 --- a/spec/defines/client_spec.rb +++ b/spec/defines/client_spec.rb @@ -52,7 +52,7 @@ context 'with password' do let(:params) do super().merge( - password: "foo bar", + password: 'foo bar', ) end From dbed609969e7ad25744933b39bbf840c5a151f10 Mon Sep 17 00:00:00 2001 From: Jonathan Gazeley Date: Sun, 10 Apr 2022 21:02:15 +0100 Subject: [PATCH 3/5] Add note about CI --- CONTRIBUTING.md | 10 ++++++++++ README.md | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..cd7c0473 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# Contributing + +This module was written primarily for internal use - features we haven't needed to +use probably haven't been written. Please send pull requests with new features and +bug fixes. You are also welcome to file issues but I make no guarantees of +development effort if the features aren't useful to my employer. + +This module uses Github Actions for testing and validation. Any contributions +must pass tests cleanly, so please ensure you update the tests to match your +contribution. diff --git a/README.md b/README.md index 6be4fe9c..b6f89861 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ * [`freeradius::template`](#freeradiustemplate) * [`freeradius::virtual_module`](#freeradiusvirtual_module) 4. [Limitations - OS compatibility, etc.](#limitations) -5. [Development - Guide for contributing to the module](#development) ## Overview @@ -1625,10 +1624,3 @@ might work. Likely sticking points with other distros are the names of packages, services and file paths. This module requires Puppet 4 or greater. - -## Development - -This module was written primarily for internal use - features we haven't needed to -use probably haven't been written. Please send pull requests with new features and -bug fixes. You are also welcome to file issues but I make no guarantees of -development effort if the features aren't useful to my employer. From 6e2ed0e26cf738f39b7bde1ab00c520d38541bef Mon Sep 17 00:00:00 2001 From: Jonathan Gazeley Date: Sun, 10 Apr 2022 21:24:36 +0100 Subject: [PATCH 4/5] Add action for publishing to Forge --- .github/workflows/publish.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..e2808ab4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +name: Build and publish to Puppet Forge + +on: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+ + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Get latest tag + id: vars + run: echo ::set-output name=tag::${GITHUB_REF:10} + - name: Clone repository + uses: actions/checkout@v2 + with: + ref: ${{ steps.vars.outputs.tag }} + - name: Build and publish module + uses: barnumbirr/action-forge-publish@v2.8.0 + env: + FORGE_API_KEY: ${{ secrets.FORGE_API_KEY }} + REPOSITORY_URL: https://forgeapi.puppet.com/v3/releases From e092b32e071ba0913e96f88745c95a448c300a72 Mon Sep 17 00:00:00 2001 From: Jonathan Gazeley Date: Sun, 10 Apr 2022 21:29:43 +0100 Subject: [PATCH 5/5] Update Changelog for 3.9.2 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1f0c102..c8d5eab3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +### 3.9.2 + * Bugfix: Restart FreeRADIUS after any huntgroups modification + ### 3.9.1 * Various bugfixes in parameter type validation (thanks @craigwatson and @amateo)