Skip to content

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:

  1. The source code is already checked out in the job runner when the job starts. Checking it out again inside the image is inefficient.
  2. 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.
  3. The code is checked out from 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. Fixed in !117489 (merged)

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).

(There is a version of the initial MR that creates a separate image in MRs. It might have some useful code)

Edited by Mark Lapierre