From b7dd9bec69932c54c8eabb38439910c0a2eeba57 Mon Sep 17 00:00:00 2001 From: Newbyte Date: Tue, 16 Apr 2024 17:31:00 +0200 Subject: [PATCH] CI: Use yaml anchor for global before_script (MR 2297) The local before_script variable overrides the global one, which I assume wasn't the intent when the local before_script was added to mr-settings. As such, add an achor to ensure that the global one is run too. --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 21053f7d..cd575d1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ workflow: - if: $CI_COMMIT_BRANCH == 'master' - if: $CI_COMMIT_BRANCH == 'wip' -before_script: +before_script: &global_before_scripts - ".ci/note.sh" - "echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories" - "adduser -D build" @@ -52,6 +52,7 @@ mr-settings: rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' before_script: + - *global_before_scripts - "apk -q add python3" - "wget -q 'https://gitlab.com/postmarketOS/ci-common/-/raw/master/check_mr_settings.py'" script: