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

[Feature Request] Configuration option for runner job hooks #4260

Open
winwinashwin opened this issue Nov 15, 2024 · 0 comments · May be fixed by #4263
Open

[Feature Request] Configuration option for runner job hooks #4260

winwinashwin opened this issue Nov 15, 2024 · 0 comments · May be fixed by #4263

Comments

@winwinashwin
Copy link
Contributor

winwinashwin commented Nov 15, 2024

Action runners allow configuring pre/post job hooks. This is officially intended for administrators to configure custom scripts to be invoked at the start/end of every job.

Refer official ADR: Notification Hooks for Runners

Prior to release 5.12.2, this configuration via terraform was not possible for reasons outlined here

The internal hook was removed in bbcb470, as a consequence, it is possible to configure the hook with the userdata_post_install option (but in a rather obscure way) as explained here.

This is still error prone as the user might not be aware "if" an internal hook is set in start-runner.sh similar to versions prior 5.12.2.

I personally prefer the transparency in config options that is there today like userdata_template as the user is clearly made aware that they are "replacing" the default template.

Requesting to add out of the box configuration options to set ACTIONS_RUNNER_HOOK_JOB_STARTED and ACTIONS_RUNNER_HOOK_JOB_COMPLETED hooks.

Related to: #3854

I'm happy to contribute if there is a decision to move ahead with the feature request.

winwinashwin added a commit to winwinashwin/terraform-aws-github-runner that referenced this issue Nov 21, 2024
…bs#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: philips-labs#3854
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant