Add default:hooks:pre_get_sources_script syntax for CI config
What does this MR do and why?
This MR targets the branch of !102332 (merged). The target branch needs to be master
before the merge.
This MR adds the hooks:pre_get_sources_script
syntax to the CI config for default
.
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
default:
hooks:
pre_get_sources_script:
- echo 'hello job pre_get_sources'
job:
script: echo 'hello job script'
Implementation table
Runner counterpart: gitlab-runner!3713 (merged)
Step | Status |
---|---|
1. Add the basic job syntax. | !102332 (merged) |
2. Add default:script_hooks . |
<-- This MR |
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.