From 07fe6b87da3083c349ed51d7435acfbbd7d75578 Mon Sep 17 00:00:00 2001 From: gitbot <gitbot@garz-fricke.com> Date: Mon, 24 Apr 2023 11:26:01 +0000 Subject: [PATCH] Integrate gitlab-ci/fix-branch-protection-check -- Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/23680f489b33d1fc2270958cf174f00701947774 Fix check for branch protection state Since the changes of 939ade2b9f98b3e1569332270a7ab16ce7d70b4a we observe that pipelines are executed on non-protected branches, which is not what we want. GitLab's documentation was a bit unclear on the according CI variables CI_COMMIT_REF_PROTECTED and CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED, as stated in this stack overflow answer: https://stackoverflow.com/a/59023344/3018229 We need to explicitly check for the variable values to be "true" instead of just checking whether they are set. --- .gitlab-ci | 2 +- .gitlab-ci.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci b/.gitlab-ci index 939ade2..23680f4 160000 --- a/.gitlab-ci +++ b/.gitlab-ci @@ -1 +1 @@ -Subproject commit 939ade2b9f98b3e1569332270a7ab16ce7d70b4a +Subproject commit 23680f489b33d1fc2270958cf174f00701947774 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a3b42da..1786472 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,9 +4,9 @@ # --------------------------------------------------------------------------------------- include: - project: '${CI_PROJECT_ROOT_NAMESPACE}/yocto/infrastructure/gitlab-ci' - ref: 939ade2b9f98b3e1569332270a7ab16ce7d70b4a + ref: 23680f489b33d1fc2270958cf174f00701947774 file: 'manifest-integration.yml' variables: - GITLAB_CI_REVISION: 939ade2b9f98b3e1569332270a7ab16ce7d70b4a + GITLAB_CI_REVISION: 23680f489b33d1fc2270958cf174f00701947774 BB_RECIPE_NAME: secure-element-examples -- GitLab