From 2649a0ba0a88da041b7af0c2c513b6617c7196e9 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Mon, 26 Jun 2023 07:23:10 -0700 Subject: [PATCH 1/6] Adds workflow for running salt test on windows --- .github/workflows/test-salt-windows.yml | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/test-salt-windows.yml diff --git a/.github/workflows/test-salt-windows.yml b/.github/workflows/test-salt-windows.yml new file mode 100644 index 0000000..999115e --- /dev/null +++ b/.github/workflows/test-salt-windows.yml @@ -0,0 +1,65 @@ +name: Run salt formula tests on Windows + +on: + workflow_call: + inputs: + salt-os-version: + description: Github Windows runner to run the tests on, see + required: true + type: string + salt-state: + description: Salt state to execute + required: true + type: string + salt-pillar-root: + description: Relative paths to the salt pillar to test + default: '' + type: string + salt-installer-url: + description: URL to the salt installer + default: https://repo.saltproject.io/salt/py3/windows/minor/3006.1/Salt-Minion-3006.1-Py3-AMD64-Setup.exe + type: string + +defaults: + run: + shell: pwsh + +jobs: + test: + runs-on: ${{ inputs.salt-os-version}} + steps: + - name: Clone this git repository + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + + # Install salt + - run: > + (new-object net.webclient).DownloadFile( + "${{ inputs.salt-installer-url }}", + "${env:temp}\salt-minion-installer.exe" ) + - run: > + Start-Process -FilePath "${env:temp}\salt-minion-installer.exe" + -ArgumentList @("/S", "/install-dir=c:\salt") + -NoNewWindow -PassThru -Wait + - run: C:\salt\salt-call.exe --versions-report + + # Sync custom salt modules, if any + - run: > + C:\salt\salt-call.exe --local --retcode-passthrough + --log-file-level debug + --file-root="${{ github.workspace }}" --pillar-root=${{ inputs.salt-pillar-root }} + saltutil.sync_all + + # Run tests + - run: > + C:\salt\salt-call.exe --local --retcode-passthrough + --log-file-level debug + --file-root="${{ github.workspace }}" --pillar-root=${{ inputs.salt-pillar-root }} + state.show_sls + "${{ inputs.salt-state }}" + - run: > + C:\salt\salt-call.exe --local --retcode-passthrough + --log-file-level debug + --file-root="${{ github.workspace }}" --pillar-root=${{ inputs.salt-pillar-root }} + state.sls + "${{ inputs.salt-state }}" + mock=True From cb198975ef46b1db6a613640046cb86e03243049 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 08:02:10 +0000 Subject: [PATCH 2/6] Bump plus3it/tardigrade-ci from 0.24.6 to 0.24.7 Bumps plus3it/tardigrade-ci from 0.24.6 to 0.24.7. --- updated-dependencies: - dependency-name: plus3it/tardigrade-ci dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2952edb..d1770c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 with: fetch-depth: 0 - - run: git fetch --tags --force origin # WA: https://github.com/actions/checkout/issues/882 + - run: git fetch --tags --force origin # WA: https://github.com/actions/checkout/issues/882 - name: Test release condition id: release @@ -66,7 +66,7 @@ jobs: uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 with: name: ${{ steps.release.outputs.version }} - tag_name: ${{ steps.release.outputs.version }} + tag_name: ${{ steps.release.outputs.version }} generate_release_notes: true target_commitish: ${{ env.GITHUB_REF }} token: ${{ secrets.release-token }} diff --git a/Dockerfile b/Dockerfile index abbcc61..125a5f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -FROM plus3it/tardigrade-ci:0.24.6 +FROM plus3it/tardigrade-ci:0.24.7 From 954589e0a5bff9b9ef47e335a88eee28582eb22e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 08:00:33 +0000 Subject: [PATCH 3/6] Bump reviewdog/action-actionlint from 1.37.0 to 1.37.1 Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.37.0 to 1.37.1. - [Release notes](https://github.com/reviewdog/action-actionlint/releases) - [Commits](https://github.com/reviewdog/action-actionlint/compare/42de1e3a0f52d5f8b8390894de87bc603844e530...7485c2136bd093d2317a854c72910eebaee35238) --- updated-dependencies: - dependency-name: reviewdog/action-actionlint dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 083a199..b411900 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,4 +25,4 @@ jobs: uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - name: Check workflow files - uses: reviewdog/action-actionlint@42de1e3a0f52d5f8b8390894de87bc603844e530 + uses: reviewdog/action-actionlint@7485c2136bd093d2317a854c72910eebaee35238 From f4317d45a9e5dd973389e7c9cbb114db1ddd2fbc Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Mon, 26 Jun 2023 08:33:03 -0700 Subject: [PATCH 4/6] Corrects commitish ref in release workflow to use sha --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1770c7..b53dca8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,5 +68,5 @@ jobs: name: ${{ steps.release.outputs.version }} tag_name: ${{ steps.release.outputs.version }} generate_release_notes: true - target_commitish: ${{ env.GITHUB_REF }} + target_commitish: ${{ github.sha }} token: ${{ secrets.release-token }} From 194ec295b6ca94464c1a89cd0c0c816647dcc486 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Mon, 26 Jun 2023 10:10:56 -0700 Subject: [PATCH 5/6] Sets pwsh shell on each step to workaround actionlint issue See also: https://github.com/rhysd/actionlint/issues/315 --- .github/workflows/test-salt-windows.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-salt-windows.yml b/.github/workflows/test-salt-windows.yml index 999115e..eb739b2 100644 --- a/.github/workflows/test-salt-windows.yml +++ b/.github/workflows/test-salt-windows.yml @@ -20,10 +20,6 @@ on: default: https://repo.saltproject.io/salt/py3/windows/minor/3006.1/Salt-Minion-3006.1-Py3-AMD64-Setup.exe type: string -defaults: - run: - shell: pwsh - jobs: test: runs-on: ${{ inputs.salt-os-version}} @@ -36,11 +32,14 @@ jobs: (new-object net.webclient).DownloadFile( "${{ inputs.salt-installer-url }}", "${env:temp}\salt-minion-installer.exe" ) + shell: pwsh - run: > Start-Process -FilePath "${env:temp}\salt-minion-installer.exe" -ArgumentList @("/S", "/install-dir=c:\salt") -NoNewWindow -PassThru -Wait + shell: pwsh - run: C:\salt\salt-call.exe --versions-report + shell: pwsh # Sync custom salt modules, if any - run: > @@ -48,6 +47,7 @@ jobs: --log-file-level debug --file-root="${{ github.workspace }}" --pillar-root=${{ inputs.salt-pillar-root }} saltutil.sync_all + shell: pwsh # Run tests - run: > @@ -56,6 +56,7 @@ jobs: --file-root="${{ github.workspace }}" --pillar-root=${{ inputs.salt-pillar-root }} state.show_sls "${{ inputs.salt-state }}" + shell: pwsh - run: > C:\salt\salt-call.exe --local --retcode-passthrough --log-file-level debug @@ -63,3 +64,4 @@ jobs: state.sls "${{ inputs.salt-state }}" mock=True + shell: pwsh From bb6620e6eaecdc5dae307d4acc9648514543f1c5 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Mon, 26 Jun 2023 08:03:40 -0700 Subject: [PATCH 6/6] Bumps version to 1.3.0 --- .bumpversion.cfg | 2 +- CHANGELOG.md | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 027e002..f7e0950 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.2.1 +current_version = 1.3.0 commit = True message = Bumps version to {new_version} tag = False diff --git a/CHANGELOG.md b/CHANGELOG.md index 5863ef4..e08d617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +### [1.3.0](https://github.com/plus3it/actions-workflows/releases/tag/1.3.0) + +**Released**: 2023.06.26 + +**Summary**: + +* Adds reusable workflow for testing salt formulas on Windows + +### [1.2.1](https://github.com/plus3it/actions-workflows/releases/tag/1.2.1) + +**Released**: 2023.06.20 + +**Summary**: + +* Improves the logic getting the current version to avoid multiple returns + ### [1.2.0](https://github.com/plus3it/actions-workflows/releases/tag/1.2.0) **Released**: 2023.05.22 **Summary**: -* Adds reusable workflow for testing salt formulas +* Adds reusable workflow for testing salt formulas on Linux ### [1.1.0](https://github.com/plus3it/actions-workflows/releases/tag/1.1.0)