]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Rewrite cherry-pick references during autorebases
authorMichał Kępień <michal@isc.org>
Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 21 May 2026 09:31:34 +0000 (11:31 +0200)
Use a custom rebasing script instead of "git rebase" to enable rewriting
cherry-pick references during autorebases.

(cherry picked from commit 98c3f339bf9271b3ef7d79aef30d25a6a26e3c92)

.gitlab-ci.yml

index b592a4cc8cc75f30d162eaa3cf9f3d9cfeb399d8..fa49b7f2aa314079e9932c9f64b07c7264a4da47 100644 (file)
@@ -2519,9 +2519,11 @@ merged-metadata:
   script:
     # CI job token is not sufficient for push operations
     - git remote get-url origin | sed -e "s/gitlab-ci-token:${CI_JOB_TOKEN}/oauth2:${BIND_TEAM_WRITE_TOKEN}/" | xargs git remote set-url --push origin
-    - git remote add base-project "https://oauth2:${BIND_TEAM_API_TOKEN}@gitlab.isc.org/${BASE_PROJECT}.git"
-    - git fetch --depth=1000 base-project "${BASE_COMMIT}"
-    - git rebase --rebase-merges "${BASE_COMMIT}"
+    - git remote add base-project "${CI_SERVER_URL}/${BASE_PROJECT}.git"
+    - git fetch --depth="${GIT_DEPTH}" base-project "${BASE_COMMIT}"
+    - *git_clone_bind9-qa
+    - >
+      "$CI_PROJECT_DIR"/bind9-qa/releng/rebase.py ${REWRITE_CHERRY_PICKS_FROM:+--rewrite-cherry-picks-from ${REWRITE_CHERRY_PICKS_FROM}} --base-project "${BASE_PROJECT}" "${BASE_COMMIT}"
     - autoreconf -fi
     - *configure
     - make -j${BUILD_PARALLEL_JOBS:-1} V=1
@@ -2569,6 +2571,7 @@ autorebase-trigger-security:
     REBASE_ONLY: 1
     BASE_PROJECT: isc-projects/bind9
     BASE_COMMIT: "${CI_COMMIT_SHA}"
+    REWRITE_CHERRY_PICKS_FROM: security-main,security-bind-9.20
   trigger:
       project: isc-private/bind9
       branch: "security-${CI_COMMIT_BRANCH}"