[sysadmin/buildstream-management] /: track: also parameterize the branch for tracking

Harald Sitter <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit d40bb981403c0e56e91a994a1c1d9f49f9b0830e by Harald Sitter.
Committed on 03/08/2026 at 20:27.
Pushed by sitter into branch 'master'.

track: also parameterize the branch for tracking

kde-linux-packages doesn't have the stuff in master yet

M  +3    -2    .gitlab-ci.yml
M  +4    -4    track.sh

https://invent.kde.org/sysadmin/buildstream-management/-/commit/d40bb981403c0e56e91a994a1c1d9f49f9b0830e

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c11a60e..1f2d5f2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,7 +20,7 @@ include:
 
 variables:
   KDECI_BUILD: "TRUE"
-  YOLO_PUSH_TO_MASTER: "FALSE"
+  YOLO_PUSH_TO_ORIGIN: "FALSE"
 
 track_kde-buildstream:on-schedule:
   stage: build
@@ -37,7 +37,8 @@ track_kde-linux-packages:on-schedule:
   variables:
     # The packages pipeline builds A LOT of stuff and doesn't have nearly as good caching so it is rather wasteful.
     # Push to master directly. We have other mechanisms to prevent breakage later down the pipeline.
-    YOLO_PUSH_TO_MASTER: "TRUE"
+    YOLO_PUSH_TO_ORIGIN: "TRUE"
+    TARGET_BRANCH: "buildstream"
   tags:
     - amd64
   rules:
diff --git a/track.sh b/track.sh
index 462c37b..035767d 100755
--- a/track.sh
+++ b/track.sh
@@ -14,7 +14,7 @@ python3 -m venv .venv --system-site-packages
 python3 -m pip install --upgrade pip
 python3 -m pip install 'BuildStream>=2.7' buildstream-plugins dulwich tomlkit
 
-git clone --depth 1 --branch master https://oauth2:$KDECI_PUSH_TOKEN@$CI_SERVER_FQDN/$TARGET_PROJECT.git repo
+git clone --depth 1 --branch "$TARGET_BRANCH" https://oauth2:$KDECI_PUSH_TOKEN@$CI_SERVER_FQDN/$TARGET_PROJECT.git repo
 cd repo
 
 bst source track "$@"
@@ -23,9 +23,9 @@ git config user.email "[email protected]"
 git config user.name "KDE CI"
 git add .
 git commit -m "Automatic buildstream source track update"
-if [ "$YOLO_PUSH_TO_MASTER" = "TRUE" ]; then
-    git pull --rebase origin master
-    git push origin HEAD:master
+if [ "$YOLO_PUSH_TO_ORIGIN" = "TRUE" ]; then
+    git pull --rebase origin "$TARGET_BRANCH"
+    git push origin "$TARGET_BRANCH"
 else
     git push origin HEAD:work/ci/bst-source-track --force --push-option merge_request.create
 fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.