Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.10.0
current_version = 1.11.0
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/test-terrafirm-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run terrafirm integration tests for salt formulas

on:
workflow_call:
inputs:
source-build:
description: Source build to test (e.g., al2023, centos9stream, rhel8, rhel9, rl9, ol9, win16, win19, win22)
required: true
type: string

Comment thread
eemperor marked this conversation as resolved.
formula-archive-url:
description: Optional URL for formula zip archive; if omitted, dynamically generated from event
required: false
type: string
default: ""
terrafirm-git-repo-name:
description: Terrafirm repository in owner/repo format
required: false
type: string
default: plus3it/terrafirm
terrafirm-git-ref:
description: Terrafirm Git ref (branch/tag/commit)
required: false
type: string
default: master
watchmaker-common-args:
description: Watchmaker arguments passed to terrafirm, shared by linux and windows platforms
required: false
type: string
default: "-n -e dev"
watchmaker-git-url:
description: Watchmaker git clone URL
required: false
type: string
default: https://github.com/plus3it/watchmaker.git
watchmaker-git-ref:
description: Watchmaker Git ref used for source installs
required: false
type: string
default: main

permissions:
contents: read

jobs:
test-source:
runs-on: ${{ fromJSON(format('["codebuild-p3-terrafirm-{0}-{1}", "image-size:small"]', github.run_id, github.run_attempt)) }}
env:
AWS_DEFAULT_REGION: us-east-1
TF_VAR_aws_region: us-east-1
TF_VAR_codebuild_id: ${{ github.run_id }}-${{ github.run_attempt }}
TF_VAR_common_args: ${{ inputs.watchmaker-common-args }}
TF_VAR_user_formulas: >-
{"${{ github.event.repository.name }}":"${{ inputs.formula-archive-url || format('https://github.com/{0}/archive/refs/heads/{1}.zip', github.event.pull_request.head.repo.full_name || github.repository, github.event.pull_request.head.ref || github.ref_name) }}"}
TF_VAR_git_ref: ${{ inputs.watchmaker-git-ref || 'main' }}
TF_VAR_git_repo: ${{ inputs.watchmaker-git-url || 'https://github.com/plus3it/watchmaker.git' }}
TF_VAR_source_builds: '["${{ inputs.source-build }}"]'
TF_VAR_source_source: git
TF_VAR_standalone_builds: '[]'
steps:
- name: Terrafirm integration tests
id: terrafirm
uses: plus3it/terrafirm/.github/actions/test@cfbd4fbc74ae901b598184b538a7bdd0e9ac74eb
with:
destroy-after-test: true
terrafirm-repository: ${{ inputs.terrafirm-git-repo-name }}
terrafirm-ref: ${{ inputs.terrafirm-git-ref }}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ 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.11.0](https://github.com/plus3it/actions-workflows/releases/tag/1.11.0)

**Released**: 2026.07.15

* Provides a reusable workflow for running terrafirm integration tests with salt formulas
* Dependency Updates
* softprops/action-gh-release 3.0.1
* actions/checkout 7.0.0
* tardigrade-ci 0.29.6

### [1.10.0](https://github.com/plus3it/actions-workflows/releases/tag/1.10.0)

**Released**: 2026.04.27
Expand Down
74 changes: 70 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ workflows are located in the directory [.github/workflows](.github/workflows).

* [lint](.github/workflows/lint.yml)
* [test](.github/workflows/test.yml)
* [test-terrafirm-integration](.github/workflows/test-terrafirm-integration.yml)
* [release](.github/workflows/release.yml)

The release logic is also available as a composite action. Only difference is that
Expand All @@ -29,7 +30,7 @@ Inputs:

An example of calling the reusable `lint` workflow:

```
```yaml
name: Run lint and static analyis checks
on:
pull_request:
Expand All @@ -55,7 +56,7 @@ Inputs:

An example of calling the reusable `test` workflow:

```
```yaml
name: Run test jobs
on:
pull_request:
Expand All @@ -70,6 +71,71 @@ jobs:
uses: plus3it/actions-workflows/.github/workflows/test.yml@v1
```

### `test-terrafirm-integration`

Reusable workflow for running terrafirm integration tests in salt formula repositories.
The caller workflow is responsible for defining trigger conditions (e.g., PR review comment,
workflow dispatch, schedule) and specifying the test matrix. This workflow handles test
execution with CodeBuild runners for a single source build.

Inputs:

* `source-build`: **Required.** Source build to test (e.g., al2023, centos9stream, rhel8, rhel9, ol9).
* `watchmaker-git-url`: Watchmaker Git clone URL. Defaults to `https://github.com/plus3it/watchmaker.git`.
* `watchmaker-git-ref`: Watchmaker Git ref (branch/tag). Defaults to `main`.
* `watchmaker-common-args`: Watchmaker arguments passed to terrafirm, shared by linux and windows platforms. Defaults to `"-n -e dev"`.
* `formula-archive-url`: Optional URL for formula zip archive. If omitted, dynamically generated from event.

An example of calling the reusable `test-terrafirm-integration` workflow:

```yaml
name: Run terrafirm integration tests

on:
workflow_dispatch:
inputs:
watchmaker-git-url:
description: Watchmaker git clone URL
required: false
default: https://github.com/plus3it/watchmaker.git
type: string
watchmaker-git-ref:
description: Watchmaker git ref
required: false
default: main
type: string
formula-archive-url:
description: Optional URL to the salt formula zip archive
required: false
default: ""
type: string

pull_request_review:
types: [submitted]

permissions:
contents: read

jobs:
integration:
if: contains(github.event.review.body, '/build') || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
source-build:
- al2023
- centos9stream
- rhel8
- rhel9
- ol9
uses: plus3it/actions-workflows/.github/workflows/test-terrafirm-integration.yml@<ref>
with:
source-build: ${{ matrix.source-build }}
watchmaker-git-url: ${{ github.event.inputs.watchmaker-git-url }}
watchmaker-git-ref: ${{ github.event.inputs.watchmaker-git-ref }}
formula-archive-url: ${{ github.event.inputs.formula-archive-url }}
```

### `release`

Inputs:
Expand All @@ -82,7 +148,7 @@ Secrets:

An example of calling the reusable `release` workflow:

```
```yaml
name: Create GitHub Release

on:
Expand Down Expand Up @@ -112,7 +178,7 @@ Inputs:
* `draft`: Optional. Creates the GitHub Release as a draft. Defaults to `false`.
* `release-token`: Required. Token with permissions to create GitHub Releases.

```
```yaml
name: Create GitHub Release

on:
Expand Down