Skip to content

Commit

Permalink
Kogito 2: Fix setup-branch (#1865) (#1867)
Browse files Browse the repository at this point in the history
Co-authored-by: Tristan Radisson <tradisso@redhat.com>
  • Loading branch information
github-actions[bot] and radtriste committed Sep 5, 2023
1 parent 6b4f833 commit 98dde61
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 @@ -126,7 +126,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 98dde61

Please sign in to comment.