From 5212d0a1e8c36097fd90820c65f274017d2724f1 Mon Sep 17 00:00:00 2001 From: Alexandros Frantzis Date: Fri, 22 Mar 2019 11:57:11 +0200 Subject: [PATCH] ci: Trigger the docker image build on merge requests Our current CI setup doesn't specify a proper dependency between the build and test CI stages for merge requests, since the test stage jobs are triggered on 'merge_requests' whereas the build stage jobs are not. This leads to both build and test jobs starting in parallel for merge requests, potentially leading to the tests running with an older docker image. This patch triggers the build stage jobs on 'merge_requests' ensuring correct dependencies. Signed-off-by: Alexandros Frantzis Reviewed-By: Gert Wollny --- ci/.gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/.gitlab-ci.yml b/ci/.gitlab-ci.yml index 471f028..448ecc0 100644 --- a/ci/.gitlab-ci.yml +++ b/ci/.gitlab-ci.yml @@ -34,6 +34,10 @@ build docker image: - docker history $CI_REGISTRY_IMAGE:latest - time docker push $CI_REGISTRY_IMAGE:latest + only: + - branches + - tags + - merge_requests artifacts: when: always @@ -60,6 +64,10 @@ make check: bash -c "/virglrenderer/ci/run_tests.sh --make-check" 2>&1 | tee results/docker_test_log.txt - echo "\n\n" + only: + - branches + - tags + - merge_requests artifacts: when: always