Add build respository checkout init container function
What does this MR do?
In this iteration, the MR adds a Kubernetes config value honour_entrypoint, which, when set, we perform the get_sources step
in an init container. This means git_sources, which earlier ran in the helper container, will now be skipped.
Later, MR will address how we actually honour the entry point of the Dockerfile.
Why was this MR needed?
Addresses: #37243 (closed)
Example Logs
Success:
Gitaly correlation ID: cebfe5d65ce94f0faef8f505e4ea5578
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/lbhardwaj-test/sub-module-project-a/.git/
Created fresh repository.
Checking out 1f48056b as detached HEAD (ref is main)...
Updating/initializing submodules recursively with git depth set to 1...
Submodule 'sub-module-project-b' (https://gitlab.com/lbhardwaj-test/sub-module-project-b.git) registered for path 'sub-module-project-b'
Synchronizing submodule url for 'sub-module-project-b'
Cloning into '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b'...
Submodule path 'sub-module-project-b': checked out 'f4914c51d2296a6536bbdbf828fbd7d5138daa5e'
Updated submodules
Synchronizing submodule url for 'sub-module-project-b'
Entering 'sub-module-project-b'
Entering 'sub-module-project-b'
Failure:
Gitaly correlation ID: bd02a6cff4e44524a55d8d68bae44659
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/lbhardwaj-test/sub-module-project-a/.git/
Created fresh repository.
Checking out 5a9d5982 as detached HEAD (ref is main)...
Updating/initializing submodules recursively with git depth set to 1...
Submodule 'sub-module-project-b' (https://gitlab.com/lbhardwaj-test/sub-module-project-b.git) registered for path 'sub-module-project-b'
Synchronizing submodule url for 'sub-module-project-b'
Cloning into '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b'...
fatal: unable to access 'https://gitlab_blah.com/lbhardwaj-test/sub-module-project-b.git/': Could not resolve host: gitlab_blah.com
fatal: clone of 'https://gitlab.com/lbhardwaj-test/sub-module-project-b.git' into submodule path '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b' failed
Failed to clone 'sub-module-project-b'. Retry scheduled
Cloning into '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b'...
fatal: unable to access 'https://gitlab_blah.com/lbhardwaj-test/sub-module-project-b.git/': Could not resolve host: gitlab_blah.com
fatal: clone of 'https://gitlab.com/lbhardwaj-test/sub-module-project-b.git' into submodule path '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b' failed
Failed to clone 'sub-module-project-b' a second time, aborting
Updating submodules failed. Retrying...
Synchronizing submodule url for 'sub-module-project-b'
Cloning into '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b'...
fatal: unable to access 'https://gitlab_blah.com/lbhardwaj-test/sub-module-project-b.git/': Could not resolve host: gitlab_blah.com
fatal: clone of 'https://gitlab.com/lbhardwaj-test/sub-module-project-b.git' into submodule path '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b' failed
Failed to clone 'sub-module-project-b'. Retry scheduled
Cloning into '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b'...
fatal: unable to access 'https://gitlab_blah.com/lbhardwaj-test/sub-module-project-b.git/': Could not resolve host: gitlab_blah.com
fatal: clone of 'https://gitlab.com/lbhardwaj-test/sub-module-project-b.git' into submodule path '/builds/lbhardwaj-test/sub-module-project-a/sub-module-project-b' failed
Failed to clone 'sub-module-project-b' a second time, aborting
Edited by Love Bhardwaj