Skip to content

Commit

Permalink
Kogito 2: Fix setup-branch (#1783)
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste committed Sep 5, 2023
1 parent 3b5dc27 commit ac1ef04
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,15 @@ void checkoutRepo(String repository, String branch) {
}

String getDroolsTargetBranch() {
return util.calculateTargetReleaseBranch(getBuildBranch(), 7)
String targetBranch = getBuildBranch()
List versionSplit = targetBranch.split("\\.") as List

if (versionSplit[0].isNumber()) {
targetBranch = "${Integer.parseInt(versionSplit[0]) + 7}.${versionSplit.tail().join('.')}"
} else {
echo "Cannot parse targetBranch as release branch so going further with current value: ${targetBranch}"
}
return targetBranch
}

String getRepoName() {
Expand Down

0 comments on commit ac1ef04

Please sign in to comment.