Skip to content

Improve build jobs and make them suitable for multi-pipeline

Can Eldem requested to merge use-tmp-image into master

Description

Prior to this MR, the build jobs perform three tasks: build the image, test it, and push it after the tests pass. This is not efficient since building and testing the image is repeated multiple times in the same pipeline.

Also, prior to this MR, it's difficult to predict the path/tag of the Docker image being tested with test projects, in the downstream stage.

To solve these two issues, this MR introduces a new build stage that builds a temporary image, later to be tested, and eventually tagged if all tests pass. The image tag is specific to the commit and is prefixed with /tmp, making clear that this is not an official image.

The integration tests are moved to a dedicated integration test job, part of the test stage.

The new pipeline is similar to klar's pipeline but has an extra go stage where the Go code is tested, checked, and compiled.

Related issue

gitlab-org/gitlab#10658 (closed)

Testing

image

Edited by 🤖 GitLab Bot 🤖

Merge request reports