From 8bf52ff025138b1c7f2c89d46d90bd46cd58fb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Thu, 18 Sep 2025 16:15:05 +0200 Subject: [PATCH] Trigger rebase in private project after merge into the public one Actual rebase and push is handled by pipeline inside the private project. (cherry picked from commit d65ac00715da693c0ea71aa322bbcd63e6a10804) --- .gitlab-ci.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ddb9d35642..5deec2b2be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -310,10 +310,10 @@ stages: - if: '$CI_COMMIT_TAG != null' .rule_source_other_than_mr: &rule_source_other_than_mr - - if: '$CI_PIPELINE_SOURCE =~ /^(api|pipeline|schedule|trigger|web)$/' + - if: '$CI_PIPELINE_SOURCE =~ /^(api|pipeline|schedule|trigger|web)$/ && $REBASE_ONLY != "1"' .rule_source_all: &rule_source_all - - if: '$CI_PIPELINE_SOURCE =~ /^(api|merge_request_event|pipeline|schedule|trigger|web)$/' + - if: '$CI_PIPELINE_SOURCE =~ /^(api|merge_request_event|pipeline|schedule|trigger|web)$/ && $REBASE_ONLY != "1"' .api-pipelines-schedules-tags-triggers-web-triggering-rules: &api_pipelines_schedules_tags_triggers_web_triggering_rules rules: @@ -503,7 +503,7 @@ stages: # variables: # SHOTGUN_ROUNDS: 3 # - &shotgun_rule_other - # if: '$CI_PIPELINE_SOURCE =~ /^(api|pipeline|schedule|trigger|web)$/' + # if: '$CI_PIPELINE_SOURCE =~ /^(api|pipeline|schedule|trigger|web)$/ && $REBASE_ONLY != "1"' # when using data from a single run, the overall instability of the results # causes quite high false positive rate, rerun the test to attemp to reduce those retry: 1 @@ -1863,7 +1863,7 @@ customer-git:branch: - if: '$CI_PROJECT_NAMESPACE == "isc-private" && $CI_PIPELINE_SOURCE == "merge_request_event"' variables: BRANCH: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME' - - if: '$CI_PROJECT_NAMESPACE == "isc-private" && $CI_PIPELINE_SOURCE =~ /^(api|pipeline|trigger|web)$/' + - if: '$CI_PROJECT_NAMESPACE == "isc-private" && $CI_PIPELINE_SOURCE =~ /^(api|pipeline|trigger|web)$/ && $REBASE_ONLY != "1"' variables: BRANCH: '$CI_COMMIT_BRANCH' before_script: @@ -2075,7 +2075,7 @@ stress-test-child-pipeline: when: manual # don't run on each MR unless requested allow_failure: true - if: '$CI_COMMIT_TAG != null' - - if: '$CI_PIPELINE_SOURCE =~ /^(api|pipeline|schedule|trigger|web)$/' + - if: '$CI_PIPELINE_SOURCE =~ /^(api|pipeline|schedule|trigger|web)$/ && $REBASE_ONLY != "1"' trigger: include: - artifact: stress-test-configs.yml @@ -2192,3 +2192,17 @@ merged-metadata: - if: '$CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_REF_NAME =~ /^bind-9.[0-9]+(-sub)?$/ || $CI_COMMIT_REF_NAME =~ /^v9.[0-9]+.[0-9]+-release$/ || $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH)' script: - bind9-qa/releng/after_merge.py "$CI_PROJECT_ID" "$MERGE_REQUEST_ID" + +auto-rebase-trigger: + stage: postmerge + rules: + - if: '$CI_PROJECT_NAMESPACE == "isc-projects" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^bind-9.[0-9]+$/' + needs: [] + interruptible: true + inherit: + variables: false + variables: + REBASE_ONLY: 1 + trigger: + project: isc-private/bind9 + branch: "${CI_COMMIT_BRANCH}-sub"