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

Document job hook scripts #3558

Open
Nuru opened this issue May 31, 2024 · 0 comments
Open

Document job hook scripts #3558

Nuru opened this issue May 31, 2024 · 0 comments
Labels
community Community contribution enhancement New feature or request needs triage Requires review from the maintainers

Comments

@Nuru
Copy link
Contributor

Nuru commented May 31, 2024

What would you like added?

The GitHub Docs document hooks to configure scripts to run before or after a job, by setting environment variables that point to scripts to run. This would suggest people could set and use those variables directly. However, the runner is already using them:

export ACTIONS_RUNNER_HOOK_JOB_STARTED=/etc/arc/hooks/job-started.sh
export ACTIONS_RUNNER_HOOK_JOB_COMPLETED=/etc/arc/hooks/job-completed.sh

It is unclear what the consequences would be of setting the environment variables to some other value, and thus not executing the expected scripts.

Furthermore, the provided scripts already provide a different mechanism for adding scripts to run,
/etc/arc/hooks/job-started.d/ and /etc/arc/hooks/job-completed.d/, but that is not documented anywhere.

Why is this needed?

Following the current documentation results in unexpected and undocumented loss of features. Adequate documentation would explain the trade-offs of losing these features and offer the alternative of adding scripts to the relevant directory.

Additional context

  • You can see here how one person tripped over this confusing documentation, preventing the installed scripts from being executed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution enhancement New feature or request needs triage Requires review from the maintainers
Projects
None yet
Development

No branches or pull requests

1 participant