V2 => Improve GDK QA test image use of GitLab source
Problem
In !109286 (merged) we create a docker image with GDK installed, as well as all the test dependencies needed to run QA tests.
When we run the image in CI it checks out the GitLab source code inside the container. It does this to avoid having to update GDK and recompile all the components, which were already compiled when the image was built.
There are at some problems with this approach:
- The source code is already checked out in the job runner when the job starts. Checking it out again inside the image is inefficient.
- The image can't be used as an artifact of the test run, which means it can't be used as-is to reproduce failures.
-
The code is checked out fromFixed in !117489 (merged)CI_COMMIT_REF_SLUG
, which isn't necessarily the code associated with the pipeline run. For example, restarting the job at a later time could check out different code. And it doesn't represent the code in merged results pipelines.
Proposal
Build an image for each pipeline and copy the GitLab code into the image from the job.
Additional requirements:
- Keep build time to a minimum (e.g., we should not have a recompile any components if the MR doesn't include any changes to those components).
Edited by Mark Lapierre