Add hooks:pre_get_sources_script syntax for CI config
What does this MR do and why?
This MR adds a new hooks:pre_get_sources_script
syntax to the CI config.
We have pre_clone_script
in the Runner config. Here, we are providing the same config in the CI YAML.
pre_clone_script
from the documentation;
Commands to be executed on the runner before cloning the Git repository. Use it to adjust the Git client configuration first, for example.
Note: The changes are behind a feature flag ci_hooks_pre_get_sources_script
(#381840 (closed)). And I used this FF only to prevent returning hooks
from the job entry for now.
- Related to #356850 (closed)
New syntax
job:
hooks:
pre_get_sources_script:
- echo 'hello job pre_get_sources'
script: echo 'hello job script'
Implementation table
Runner counterpart: gitlab-runner!3713 (merged)
Step | Status |
---|---|
1. Add the basic job syntax. | <-- This MR |
2. Add default:script_hooks . |
!103770 (merged) |
3. Add to JobRequest::Response for Runner. |
!104254 (merged) |
4. Add documentation and CI schema | !104371 (merged) |
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Marcel Amirault