Allow release bump push to fail without failing the pipeline.
Bumped files still pass to later jobs via artifacts when branch push is denied. Co-authored-by: Cursor <cursoragent@cursor.com>
@@ -128,9 +128,13 @@ bump_and_push() {
128
128
git remote set-url origin "https://oauth2:${token}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
129
129
130
130
# Push version bump only. Protected tags cannot be moved/updated.
131
git push origin "HEAD:refs/heads/${branch}" -o ci.skip
132
133
echo "Pushed version bump for ${tag} to ${branch} (ci.skip). Tag left unchanged."
131
# Push may fail (token/branch ACL); the bumped files still flow to later jobs via artifacts.
132
if git push origin "HEAD:refs/heads/${branch}" -o ci.skip; then
133
echo "Pushed version bump for ${tag} to ${branch} (ci.skip). Tag left unchanged."
134
else
135
echo "WARNING: Could not push version bump to ${branch}; continuing with local bump for this pipeline."
136
echo "WARNING: Master will catch up on a later successful bump push."
137
fi
134
138
}
135
139
136
140
upload_file() {
@@ -128,9 +128,13 @@ bump_and_push() {128
git remote set-url origin "https://oauth2:${token}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"128
git remote set-url origin "https://oauth2:${token}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"129
129
130
# Push version bump only. Protected tags cannot be moved/updated.130
# Push version bump only. Protected tags cannot be moved/updated.131
git push origin "HEAD:refs/heads/${branch}" -o ci.skip131
# Push may fail (token/branch ACL); the bumped files still flow to later jobs via artifacts.132
132
if git push origin "HEAD:refs/heads/${branch}" -o ci.skip; then133
echo "Pushed version bump for ${tag} to ${branch} (ci.skip). Tag left unchanged."133
echo "Pushed version bump for ${tag} to ${branch} (ci.skip). Tag left unchanged."134
else135
echo "WARNING: Could not push version bump to ${branch}; continuing with local bump for this pipeline."136
echo "WARNING: Master will catch up on a later successful bump push."137
fi134
}138
}135
139
136
upload_file() {140
upload_file() {