-
Notifications
You must be signed in to change notification settings - Fork 629
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: Natively support runner pre/post job hooks #4263
Conversation
0318a59
to
1182106
Compare
@npalm Could you please review? |
A bit annoying that the pull request checks are not showing up after the docs workflows kicks off. Maybe any clue how to fix this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice contribution! I will check the PR in detail later. But could you check if you can enrich the multi-runner example with the pre / post hook. I would suggest to use one of the amazon linux examples.
|
eed1623
to
95f8f56
Compare
Thanks. Added examples in the PR. |
ed574b6
to
e8e6208
Compare
@npalm Anything I can help with to get this merged? Thanks for your time. |
Not much, clear my calendar. I started last week from the bottom of the PR list. Do my best to check the PR this week. Did a quicke check, see the comments. Will run asap tests based on the examples. |
examples/multi-runner/templates/runner-configs/linux-x64-ubuntu.yaml
Outdated
Show resolved
Hide resolved
…-runners#4260) Pre and post job hooks were added to github actions to help administrators run custom scripts at the beginning and end of every job. As of today the module doesn't support these options out of the box. Add variables to accept these optional scripts and register the hook in user-data. Also enrich linux-arm64 example in multi-runner with pre/post hooks Related to: https://github.com/philips-labs/terraform-aws-github-runner/issues/3854
19f082b
to
fd48501
Compare
@npalm Thank you for your review. Updated changes as suggested. |
@npalm Anything pending here? |
No, but my time is very limitted this week. |
🤖 I have created a release *beep* *boop* --- ## [5.21.0](philips-labs/terraform-aws-github-runner@v5.20.1...v5.21.0) (2024-12-20) ### Features * Natively support runner pre/post job hooks ([#4263](https://github.com/philips-labs/terraform-aws-github-runner/issues/4263)) ([259a852](philips-labs/terraform-aws-github-runner@259a852)) ### Bug Fixes * Incorrect syncer binary location in tf outputs ([#4274](https://github.com/philips-labs/terraform-aws-github-runner/issues/4274)) ([401a373](philips-labs/terraform-aws-github-runner@401a373)), closes [#4137](https://github.com/philips-labs/terraform-aws-github-runner/issues/4137) * **lambda:** bump @octokit/types from 13.6.1 to 13.6.2 in /lambdas in the octokit group ([#4303](https://github.com/philips-labs/terraform-aws-github-runner/issues/4303)) ([9f76c4c](philips-labs/terraform-aws-github-runner@9f76c4c)) * **lambda:** bump axios from 1.7.7 to 1.7.9 in /lambdas ([#4305](https://github.com/philips-labs/terraform-aws-github-runner/issues/4305)) ([e3cd5b4](philips-labs/terraform-aws-github-runner@e3cd5b4)) * **lambda:** bump the aws group across 1 directory with 7 updates ([#4314](https://github.com/philips-labs/terraform-aws-github-runner/issues/4314)) ([3f9b768](philips-labs/terraform-aws-github-runner@3f9b768)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: forest-releaser[bot] <80285352+forest-releaser[bot]@users.noreply.github.com>
Adds two optional string arguments to the module
runner_hook_job_started
runner_hook_job_completed
If not empty, registers the hook in
user-data.sh
Ref: https://github.com/actions/runner/blob/main/docs/adrs/1751-runner-job-hooks.md
Closes: https://github.com/philips-labs/terraform-aws-github-runner/issues/4260
Discussion: https://github.com/philips-labs/terraform-aws-github-runner/issues/3854