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 <alexandros.frantzis@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
macos/master
Alexandros Frantzis 6 years ago committed by Gert Wollny
parent dbf78591ea
commit 5212d0a1e8
  1. 8
      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

Loading…
Cancel
Save