Handle the content of the new pre_get_sources_script and post_get_sources_script job payloads in Runner
Description
As a follow-up to gitlab#356850 (closed), we need to add support for the two new settings added to the job payload. It should be done in a way that will still allow runner administrators to configure these settings from config.toml as it was done until now.
Things to handle
-
Update API definition to start receiving script details sent within the job payload.
-
Concatenate that with the scripts that runner's administrator could have set in
config.toml:-
pre_clone_scriptshould be added before the part of the script that is sourced in job payload, -
post_clone_scriptshould be added after the part of the script that is sources in job payload.
-
-
Define two new configuration keys in
config.toml:pre_get_sources_scriptandpost_get_sources_script. These should be "aliases" for the existingpre_clone_scriptandpost_clone_script. -
Mark
pre_clone_scriptandpost_clone_scriptas deprecated and pending removal in the next Major release.
https://gitlab.com/gitlab-org/gitlab-runner/blob/v12.7.1/shells/abstract.go#L178