This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-runtimes.git


The following commit(s) were added to refs/heads/main by this push:
     new 1267dffd89 kie-issues#1252: Configure tagVersion programmatically for 
`data-index-ephemeral` image. (#3529)
1267dffd89 is described below

commit 1267dffd89f5b642bc4f06e295aa4bd09503640d
Author: Tiago Bento <[email protected]>
AuthorDate: Thu May 23 13:45:45 2024 -0400

    kie-issues#1252: Configure tagVersion programmatically for 
`data-index-ephemeral` image. (#3529)
    
    * New property to configure only the tagVersion
    
    * Change CI
---
 .ci/jenkins/Jenkinsfile.setup-branch                       | 14 +++++---------
 .../kogito-quarkus-workflow-common-deployment/pom.xml      |  3 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.setup-branch 
b/.ci/jenkins/Jenkinsfile.setup-branch
index 30b87417ec..9a4357bca8 100644
--- a/.ci/jenkins/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/Jenkinsfile.setup-branch
@@ -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 {
@@ -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()
                         )
                     }
                 }
@@ -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`
 }
diff --git 
a/quarkus/extensions/kogito-quarkus-workflow-extension-common/kogito-quarkus-workflow-common-deployment/pom.xml
 
b/quarkus/extensions/kogito-quarkus-workflow-extension-common/kogito-quarkus-workflow-common-deployment/pom.xml
index a215a838e8..cf9e3b9ea6 100644
--- 
a/quarkus/extensions/kogito-quarkus-workflow-extension-common/kogito-quarkus-workflow-common-deployment/pom.xml
+++ 
b/quarkus/extensions/kogito-quarkus-workflow-extension-common/kogito-quarkus-workflow-common-deployment/pom.xml
@@ -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>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to