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

  1. Update API definition to start receiving script details sent within the job payload.

  2. Concatenate that with the scripts that runner's administrator could have set in config.toml:

    • pre_clone_script should be added before the part of the script that is sourced in job payload,
    • post_clone_script should be added after the part of the script that is sources in job payload.
  3. Define two new configuration keys in config.toml: pre_get_sources_script and post_get_sources_script. These should be "aliases" for the existing pre_clone_script and post_clone_script.

  4. Mark pre_clone_script and post_clone_script as deprecated and pending removal in the next Major release.

https://gitlab.com/gitlab-org/gitlab-runner/blob/v12.7.1/shells/abstract.go#L178

Links to related issues and merge requests / references

Edited by Tomasz Maczukin