Guide to pre_clone_script changes on GitLab SaaS Linux Runners
Blog post from GitLab
In GitLab 16.0, the CI_PRE_CLONE_SCRIPT variable support in CI/CD workflows on GitLab SaaS Runners on Linux is being removed, necessitating a switch to the new pre_get_sources_script hook. The pre_clone_script was a pre-build script feature allowing custom logic execution before a GitLab Runner cloned the project repository, useful for tasks like cleaning build directories or retrieving necessary files. The new pre_get_sources_script offers a simpler, more visible method for executing scripts before the git clone and CI build scripts, ensuring immediate visibility into the script execution. To adapt, users should check their CI jobs for the CI_PRE_CLONE_SCRIPT variable and replace it with the pre_get_sources_script in the .gitlab-ci.yml file. On self-managed GitLab Runners, additional hooks like post_get_sources, pre_build, and post_build are available, with plans to add support for post_get_sources in the YAML syntax. The blog emphasizes that details are for informational purposes and subject to change at GitLab's discretion.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.