Skip to content

Commit

Permalink
Change CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagobento committed May 22, 2024
1 parent f61b9b6 commit 5b5b425
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import org.jenkinsci.plugins.workflow.libs.Library
import org.kie.jenkins.MavenCommand

droolsRepo = 'incubator-kie-drools'
dataIndexEphemeralImageName = 'docker.io/apache/incubator-kie-kogito-data-index-ephemeral'

pipeline {
agent {
Expand Down Expand Up @@ -98,8 +97,8 @@ pipeline {
getMavenCommand(getRepoName())
.withOptions(['-pl :kogito-quarkus-workflow-common-deployment'])
.withSettingsXmlFile(MAVEN_SETTINGS_FILE),
'data-index-ephemeral.image',
getDataIndexEphemeralImage()
'data-index-ephemeral.image.tagVersion',
getDataIndexEphemeralImageTagVersion()
)
}
}
Expand Down Expand Up @@ -199,13 +198,10 @@ String getWorkflowCommonDeploymentRelativePath() {
return 'quarkus/extensions/kogito-quarkus-workflow-extension-common/kogito-quarkus-workflow-common-deployment'
}

String getDataIndexEphemeralImage() {
if (isMainBranch()) {
return "${dataIndexEphemeralImageName}:main"
}
String getDataIndexEphemeralImageTagVersion() {
String version = getKogitoVersion()
if (version.endsWith('-SNAPSHOT')) {
return "${dataIndexEphemeralImageName}:${util.getMajorMinorVersion(version)}"
return getBuildBranch() // E.g., `main` or `10.0.x`
}
return "${dataIndexEphemeralImageName}:${util.getMajorMinorVersion(version)}"
return util.getMajorMinorVersion(version) // E.g., `10.0`
}

0 comments on commit 5b5b425

Please sign in to comment.