Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added publishing to workflow_job event queue for multi runner module. #2570

Merged
merged 9 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from 8 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
1 change: 1 addition & 0 deletions .github/workflows/lambda-runner-binaries-syncer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- develop
- next
pull_request:
paths:
- .github/workflows/lambda-runner-binaries-syncer.yml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lambda-runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- develop
- next
pull_request:
paths:
- .github/workflows/lambda-runners.yml
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- develop
- next
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -75,18 +76,18 @@ jobs:
yarn release -d --repositoryUrl https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git

- name: Release
if: github.event_name != 'pull_request' && contains('refs/heads/main', github.ref)
if: (github.event_name != 'pull_request' && contains('refs/heads/main', github.ref))
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
cp .release/* .
yarn
yarn release --repositoryUrl https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git

provenance:
name: Generate provenance
runs-on: ubuntu-20.04
needs:
needs:
release
if: startsWith(github.ref, 'refs/tags/')

Expand Down
36 changes: 32 additions & 4 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
- develop
- next
pull_request:
paths-ignore:
- "modules/*/lambdas/**"
Expand All @@ -15,7 +16,7 @@ jobs:
name: Verify module
strategy:
matrix:
terraform: [1.1.3, "latest"]
terraform: [1.3.2, "latest"]
runs-on: ubuntu-latest
container:
image: hashicorp/terraform:${{ matrix.terraform }}
Expand All @@ -29,7 +30,7 @@ jobs:
touch modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/runner-binaries-syncer.zip
- name: terraform init
run: terraform init -get -backend=false -input=false
- if: contains(matrix.terraform, '1.1.')
- if: contains(matrix.terraform, '1.3.')
name: check terraform formatting
run: terraform fmt -recursive -check=true -write=false
- if: contains(matrix.terraform, 'latest') # check formatting for the latest release but avoid failing the build
Expand All @@ -44,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
terraform: [1.0.11, 1.1.3, "latest"]
terraform: [1.0.11, 1.1.9, 1.2.9, "latest"]
example:
["default", "ubuntu", "prebuilt", "arm64", "ephemeral", "windows"]
defaults:
Expand All @@ -57,7 +58,7 @@ jobs:
- uses: actions/checkout@v3
- name: terraform init
run: terraform init -get -backend=false -input=false
- if: contains(matrix.terraform, '1.1.')
- if: contains(matrix.terraform, '1.3.')
name: check terraform formatting
run: terraform fmt -recursive -check=true -write=false
- if: contains(matrix.terraform, 'latest') # check formatting for the latest release but avoid failing the build
Expand All @@ -66,3 +67,30 @@ jobs:
continue-on-error: true
- name: validate terraform011
run: terraform validate


verify_multi_runner_example:
name: Verify Multi-Runner examples
strategy:
fail-fast: false
matrix:
terraform: [1.3.2, "latest"]
defaults:
run:
working-directory: examples/multi-runner
runs-on: ubuntu-latest
container:
image: hashicorp/terraform:${{ matrix.terraform }}
steps:
- uses: actions/checkout@v3
- name: terraform init
run: terraform init -get -backend=false -input=false
- if: contains(matrix.terraform, '1.3.')
name: check terraform formatting
run: terraform fmt -recursive -check=true -write=false
- if: contains(matrix.terraform, 'latest') # check formatting for the latest release but avoid failing the build
name: check terraform formatting
run: terraform fmt -recursive -check=true -write=false
continue-on-error: true
- name: validate terraform
run: terraform validate
6 changes: 5 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
{
"name": "develop",
"prerelease": true
},
{
"name": "next",
"prerelease": true
}
],
"tagFormat": "v${version}",
Expand Down Expand Up @@ -45,4 +49,4 @@
}
]
]
}
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## [2.0.0-next.1](https://github.com/philips-labs/terraform-aws-github-runner/compare/v1.12.0...v2.0.0-next.1) (2022-10-19)


### ⚠ BREAKING CHANGES

* **ci:**

### Features

* Add multi-runner capability ([#2472](https://github.com/philips-labs/terraform-aws-github-runner/issues/2472)) ([c08b335](https://github.com/philips-labs/terraform-aws-github-runner/commit/c08b335ade4e16a89d6e1068d7226c16b1eb1450)), closes [#2521](https://github.com/philips-labs/terraform-aws-github-runner/issues/2521) [#2519](https://github.com/philips-labs/terraform-aws-github-runner/issues/2519)
* Experimental feature - Duplicate workflow job event to extra queue ([#2268](https://github.com/philips-labs/terraform-aws-github-runner/issues/2268)) ([ac046b8](https://github.com/philips-labs/terraform-aws-github-runner/commit/ac046b8eb2a0d2d5e2219ae9ee0023fd8bdf7460))
* Remove old scale down mechanism (< 0.19.0) ([#2519](https://github.com/philips-labs/terraform-aws-github-runner/issues/2519)) ([721d7c3](https://github.com/philips-labs/terraform-aws-github-runner/commit/721d7c3287fd3e0caa57942d0d830b072d90c433))
* Remove support check_run ([#2521](https://github.com/philips-labs/terraform-aws-github-runner/issues/2521)) ([272a293](https://github.com/philips-labs/terraform-aws-github-runner/commit/272a293613d3a1da360f0d61bff92d16ea64216c))


### Miscellaneous Chores

* **ci:** Enable ci for next branch ([48769ca](https://github.com/philips-labs/terraform-aws-github-runner/commit/48769cacc53657ac740537a9dc63d4628b8c2562)), closes [#2472](https://github.com/philips-labs/terraform-aws-github-runner/issues/2472) [#2517](https://github.com/philips-labs/terraform-aws-github-runner/issues/2517) [#2521](https://github.com/philips-labs/terraform-aws-github-runner/issues/2521) [#2517](https://github.com/philips-labs/terraform-aws-github-runner/issues/2517) [#2519](https://github.com/philips-labs/terraform-aws-github-runner/issues/2519) [#2517](https://github.com/philips-labs/terraform-aws-github-runner/issues/2517)

## [1.12.0](https://github.com/philips-labs/terraform-aws-github-runner/compare/v1.11.0...v1.12.0) (2022-10-12)


Expand Down
Loading