From c466163d8919d2fdc7ce1a8127fa324c075cda84 Mon Sep 17 00:00:00 2001 From: Ali Can Ozaslan Date: Mon, 5 Feb 2024 10:51:48 +0000 Subject: [PATCH] ci: Fix trigger rules The META_CASSINI_PROJECT and META_CASSINI_TARGET_BRANCH variables are checked to see which ones are empty. However, since these are not defined variables, they also need a null check. CI_MERGE_REQUEST_IID only gets a unique value in the merge request. Signed-off-by: Ali Can Ozaslan --- .gitlab-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9dca7f4..f49c7d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2023 Arm Limited and/or its +# SPDX-FileCopyrightText: Copyright 2023-2024 Arm Limited and/or its # affiliates # # SPDX-License-Identifier: MIT @@ -39,15 +39,17 @@ trigger-meta-cassini: variables: false stage: Build rules: - - if: $META_CASSINI_PROJECT == "" + - if: '$META_CASSINI_PROJECT == "" || + $META_CASSINI_PROJECT == null' when: never - - if: '$CI_MERGE_REQUEST_IID == "push"' + - if: '$CI_MERGE_REQUEST_IID' variables: META_CASSINI_TARGET_BRANCH: "${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}-dev" - if: '$PARENT_PIPELINE_SOURCE == "schedule"' variables: META_CASSINI_TARGET_BRANCH: "${CI_COMMIT_BRANCH}-dev" - - if: $META_CASSINI_TARGET_BRANCH == "" + - if: '$META_CASSINI_TARGET_BRANCH == "" || + $META_CASSINI_TARGET_BRANCH == null' when: never - !reference [".build-image:rules:k3s", rules] - !reference [".build-image:rules:k3s-dev", rules] -- GitLab