Skip to content

Re-use helper container for docker executor's predefined stages

Arran Walker requested to merge ajwalker/reuse-docker-helper-container into main

What does this MR do?

This changes predefined steps to reuse the same container, rather than create a new one each time. This is similar to how build steps are already being executed with a build container.

Now that there's only ever one predefined container per job, this change also removes the additional book-keeping that was required to append an index to the container names.

Why was this MR needed?

  • Removes redundant e.builds book-keeping (#25301 (closed)).
  • Slightly faster, especially on Windows, by reducing the create/delete in between predefined stages. For example:
    • before:
      • --- PASS: TestDockerCommandMultistepBuild/Successful_build_with_release_and_after_script_step (35.75s)
      • --- PASS: TestDockerCommandMultistepBuild/Failure_on_script_step._Release_is_skipped._After_script_runs. (30.20s)
      • --- PASS: TestDockerCommandMultistepBuild/Failure_on_release_step._After_script_runs. (35.59s)
    • after:
      • --- PASS: TestDockerCommandMultistepBuild/Successful_build_with_release_and_after_script_step (33.69s)
      • --- PASS: TestDockerCommandMultistepBuild/Failure_on_script_step._Release_is_skipped._After_script_runs. (28.27s)
      • --- PASS: TestDockerCommandMultistepBuild/Failure_on_release_step._After_script_runs. (33.88s)

What's the best way to test this MR?

Existing integration tests passing.

What are the relevant issue numbers?

Closes #25301 (closed)

#30835 (closed)

Edited by Arran Walker

Merge request reports

Loading