Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] Kogito 2: Fix setup-branch #3214

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,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