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

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


The following commit(s) were added to refs/heads/main by this push:
     new 475225ac Fix weekly image tags (#1798)
475225ac is described below

commit 475225acf4f740cf7848fe2247bf616c9d15cc4e
Author: Rodrigo Antunes <[email protected]>
AuthorDate: Mon Aug 26 17:43:06 2024 -0300

    Fix weekly image tags (#1798)
---
 .ci/jenkins/Jenkinsfile.build-image   |  2 +-
 .ci/jenkins/Jenkinsfile.weekly.deploy | 16 ++++------------
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.build-image 
b/.ci/jenkins/Jenkinsfile.build-image
index 5782b0cf..aea006ce 100644
--- a/.ci/jenkins/Jenkinsfile.build-image
+++ b/.ci/jenkins/Jenkinsfile.build-image
@@ -150,7 +150,7 @@ pipeline {
                     int retries = Integer.parseInt(env.MAX_REGISTRY_RETRIES)
                     String imageTag = getBuiltImageTag()
                     if (isDeployLatestTag()) {
-                        latestTag = 
getTriggeringProjectName().contains('weekly') ? 'weekly-latest' : 'latest'
+                        latestTag = 'latest'
                         cloud.skopeoCopyRegistryImages(imageTag, 
getBuiltImageTag(latestTag), retries)
                     }
                 }
diff --git a/.ci/jenkins/Jenkinsfile.weekly.deploy 
b/.ci/jenkins/Jenkinsfile.weekly.deploy
index abf7109b..fa762daf 100644
--- a/.ci/jenkins/Jenkinsfile.weekly.deploy
+++ b/.ci/jenkins/Jenkinsfile.weekly.deploy
@@ -126,7 +126,7 @@ pipeline {
         stage('Create and push a new tag') {
             steps {
                 script {
-                    projectVersion = getProjectVersion(false)
+                    projectVersion = getProjectVersion()
                     dir(getRepoName()) {
                         
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
                         githubscm.tagRepository(projectVersion)
@@ -281,11 +281,7 @@ String getDeployImageNameSuffix() {
     return params.IMAGE_NAME_SUFFIX
 }
 String getDeployImageTag() {
-    return getBuildBranch() + "-" + getProjectVersionDate()
-}
-
-boolean isDeployLatestTag() {
-    return params.DEPLOY_WITH_LATEST_TAG
+    return getProjectVersion()
 }
 
 ////////////////////////////////////////////////////////////////////////
@@ -346,10 +342,6 @@ String getProjectVersionDate() {
     return projectVersionDate.replace('-', '')
 }
 
-String getProjectVersion(boolean keepSnapshotSuffix = true) {
-    def projectVersion = env.PROJECT_VERSION
-    if (keepSnapshotSuffix) {
-        return projectVersion.replace("-SNAPSHOT", 
"-${getProjectVersionDate()}-SNAPSHOT")
-    }
-    return projectVersion.replace("-SNAPSHOT", "-${getProjectVersionDate()}")
+String getProjectVersion() {
+    return env.PROJECT_VERSION + '-' + getProjectVersionDate()
 }


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

Reply via email to