From 52c1613c205cb1cd9edae59fe76849591377022a Mon Sep 17 00:00:00 2001 From: Justin Kromlinger Date: Sat, 7 Nov 2020 17:19:16 +0100 Subject: [PATCH] Don't use after_script to test base-devel after_script won't affect the job exit code [1], so we can't use it for tests. Instead we are using YAML anchors for script [2]. [1] https://docs.gitlab.com/ee/ci/yaml/#before_script-and-after_script [2] https://docs.gitlab.com/ee/ci/yaml/#yaml-anchors-for-script --- .gitlab-ci.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d437f6f..043c7ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -149,22 +149,26 @@ image:publish:secure: refs: - releases - tags - script: - - pacman -Sy - - pacman -Qqk - - pacman -Syu --noconfirm docker grep - - docker -v - - id -u http - - locale | grep -q UTF-8 + +.test-script: &test-script + - pacman -Sy + - pacman -Qqk + - pacman -Syu --noconfirm docker grep + - docker -v + - id -u http + - locale | grep -q UTF-8 test:base: extends: .test image: $CI_REGISTRY_IMAGE:base-$CI_COMMIT_REF_SLUG + script: + - *test-script test:base-devel: extends: .test image: $CI_REGISTRY_IMAGE:base-devel-$CI_COMMIT_REF_SLUG - after_script: + script: + - *test-script - gcc -v - g++ -v - make -v