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

kie-issues#1252: Configure tagVersion programmatically for data-index-ephemeral image. #3529

Merged
Merged
Show file tree
Hide file tree
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
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`
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
<name>Kogito :: Quarkus Workflow Extension Common :: Deployment</name>

<properties>
<data-index-ephemeral.image>docker.io/apache/incubator-kie-kogito-data-index-ephemeral:main</data-index-ephemeral.image>
<data-index-ephemeral.image.tagVersion>main</data-index-ephemeral.image.tagVersion>
<data-index-ephemeral.image>docker.io/apache/incubator-kie-kogito-data-index-ephemeral:${data-index-ephemeral.image.tagVersion}</data-index-ephemeral.image>
<java.module.name>org.kie.kogito.quarkus.workflow.deployment</java.module.name>
</properties>

Expand Down
Loading