From 8bfce327a0ad12bcf9ae2792b1df3af309821cbd Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Wed, 27 Aug 2025 21:24:55 +0200 Subject: [PATCH] [RelEng] Create and update maintenance branches in release preparation In the release preparation pipeline create the R4_XX_maintenance branch for the eclipse.platform.releng.aggregator repo and all submodules. Furthermore create the commit for the maintenance branch in the aggregator repo to move the maintained release's I-build to that maintenance branch and push it as PR against the maintenance branch. --- .../Releng/createMaintenanceBranch.groovy | 80 ----------------- .../Releng/prepareNextDevCycle.jenkinsfile | 85 +++++++++++++++++-- RELEASE.md | 2 - scripts/newReleasePrep.sh | 3 - 4 files changed, 76 insertions(+), 94 deletions(-) delete mode 100644 JenkinsJobs/Releng/createMaintenanceBranch.groovy diff --git a/JenkinsJobs/Releng/createMaintenanceBranch.groovy b/JenkinsJobs/Releng/createMaintenanceBranch.groovy deleted file mode 100644 index 6b331da056c..00000000000 --- a/JenkinsJobs/Releng/createMaintenanceBranch.groovy +++ /dev/null @@ -1,80 +0,0 @@ -job('Releng/createMaintenanceBranch'){ - displayName('Create Maintenance Branch') - description('Create a new maintenance branch for a release.') - - logRotator { - daysToKeep(5) - numToKeep(5) - } - - parameters { - stringParam('branchName', null, 'Name of the branch to be created. For example: R4_26_maintenance') - stringParam('tag', null, 'Release tag to be used when making the branch. For example: S4_26_0_RC2') - } - - label('basic') - - wrappers { //adds pre/post actions - timestamps() - sshAgent('git.eclipse.org-bot-ssh', 'github-bot-ssh') - } - - steps { - shell(''' -#!/bin/bash -x - -function fn_toPushRepo() { - from="$1" - if ! [[ "$from" == http* ]]; then - echo $from - else - echo $(sed -e 's,https://github.com/,git@github.com:,' <<< $from) - fi -} - -fn_branch_create() -{ - git checkout -b ${branchName} ${tag} - git branch --set-upstream-to origin ${branchName} - PUSH_URL="$(fn_toPushRepo $(git config --get remote.origin.url))" - git push -u $PUSH_URL ${branchName} -} - -git config --global user.email "genie.releng@eclipse.org" -git config --global user.name "Eclipse Releng Bot" - -git clone --recurse-submodules git@github.com:eclipse-platform/eclipse.platform.releng.aggregator.git - -cd eclipse.platform.releng.aggregator/ - -#create maintenance branch in aggregator if it does not exist -existingBranches=$(git branch -r) - -if [[ ! $(echo $existingBranches | grep $branchName) ]]; then { - git checkout -b ${branchName} ${tag} - git branch --set-upstream-to origin ${branchName} - PUSH_URL="$(fn_toPushRepo $(git config --get remote.origin.url))" - git push -u $PUSH_URL ${branchName} -} else { - echo "Already created branch ${branchName} in eclipse.platform.releng.aggregator" -} -fi - -for i in $(ls) -do - if [[ -d $i ]]; then { - pushd $i - existingBranches=$(git branch -r) - if [[ ! $(echo $existingBranches | grep $branchName) ]]; then { - fn_branch_create $i - } else { - echo "Already created branch ${branchName} in $i)" - } - fi - popd - } - fi -done - ''') - } -} diff --git a/JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile b/JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile index 5567ff88b08..966b3e7c7a8 100644 --- a/JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile +++ b/JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile @@ -29,15 +29,18 @@ pipeline { nextVersionMatcher = null // release matcher as it's not serializable env.PREVIOUS_RELEASE_CANDIDATE_ID = readParameter('PREVIOUS_RELEASE_CANDIDATE_ID') - def previousIdMatcher = env.PREVIOUS_RELEASE_CANDIDATE_ID =~ /(S|R)-(?\d+)\.(?\d+)(\.\d+)?(?(M|RC)\d+[a-z]?)?-(?\d{8})(?