Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • seco-ne/yocto/infrastructure/gitlab-ci
1 result
Show changes
Commits on Source (1)
  • Tim Jaacks's avatar
    Fix check for branch protection state · 23680f48
    Tim Jaacks authored
    Since the changes of 939ade2b 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.
    23680f48
......@@ -45,10 +45,10 @@ workflow:
# INTEGRATION contains a line beginning with the target branch followed by a colon.
# This also implies that the pipeline runs in merge request context only.
# - if: $INTEGRATION =~ /^$CI_MERGE_REQUEST_TARGET_BRANCH_NAME:/m
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED == "true"
# Run pipeline on target branch after merging a merge request.
# - if: $INTEGRATION =~ /^$CI_COMMIT_BRANCH:/m
- if: $CI_COMMIT_REF_PROTECTED
- if: $CI_COMMIT_REF_PROTECTED == "true"
.skip-for-gitlab-ci-integrations:
rules:
......