You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ra...@apache.org on 2024/06/20 19:33:15 UTC

(incubator-kie-optaplanner) branch main updated: NO-ISSUE: Fix weekly deploy Jenkins job (#3101)

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-optaplanner.git


The following commit(s) were added to refs/heads/main by this push:
     new 9e978e95b4 NO-ISSUE: Fix weekly deploy Jenkins job (#3101)
9e978e95b4 is described below

commit 9e978e95b49f557c6a8b4d56b776d4579f9689f4
Author: Rodrigo Antunes <co...@rodrigoantunes.com.br>
AuthorDate: Thu Jun 20 16:33:11 2024 -0300

    NO-ISSUE: Fix weekly deploy Jenkins job (#3101)
    
    Fix weekly Jenkins job
---
 .ci/jenkins/Jenkinsfile.weekly.deploy | 16 +++++++---------
 .ci/jenkins/dsl/jobs.groovy           |  2 ++
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.weekly.deploy b/.ci/jenkins/Jenkinsfile.weekly.deploy
index de68f0f178..dcde5ce02e 100644
--- a/.ci/jenkins/Jenkinsfile.weekly.deploy
+++ b/.ci/jenkins/Jenkinsfile.weekly.deploy
@@ -64,8 +64,6 @@ pipeline {
 
                     checkout scm // To make sure the repository containing the script is available on the Jenkins node.
                     imageUtils = load '.ci/jenkins/scripts/imageUtils.groovy'
-
-                    env.PROJECT_VERSION = maven.mvnGetVersionProperty(getMavenCommand(), 'project.version')
                 }
             }
             post {
@@ -74,7 +72,6 @@ pipeline {
                         setDeployPropertyIfNeeded('git.branch', getBuildBranch())
                         setDeployPropertyIfNeeded('git.branchQuickstarts', getQuickStartsBranch())
                         setDeployPropertyIfNeeded('git.author', getGitAuthor())
-                        setDeployPropertyIfNeeded('project.version', getProjectVersion())
                     }
                 }
             }
@@ -83,8 +80,8 @@ pipeline {
         stage('Clone repositories') {
             steps {
                 script {
-                    checkoutRepo(optaplannerRepository, optaplannerFolder)
-                    checkoutRepo(quickstartsRepository, quickstartsFolder)
+                    checkoutRepo(optaplannerRepository, optaplannerFolder, getBuildBranch())
+                    checkoutRepo(quickstartsRepository, quickstartsFolder, getQuickStartsBranch())
                 }
             }
         }
@@ -92,6 +89,7 @@ pipeline {
         stage('Update project version') {
             steps {
                 script {
+                    env.PROJECT_VERSION = maven.mvnGetVersionProperty(getOptaplannerMavenCommand(), 'project.version')
                     if (getDroolsVersion()) {
                         maven.mvnSetVersionProperty(getOptaplannerMavenCommand(), 'version.org.drools', getDroolsVersion())
                     }
@@ -214,15 +212,15 @@ void archiveJUnitTestResults() {
     }
 }
 
-void checkoutRepo(String repo, String dirName) {
+void checkoutRepo(String repo, String dirName, String branchName) {
     dir(dirName) {
         deleteDir()
-        checkout(githubscm.resolveRepository(repo, getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsId()))
+        checkout(githubscm.resolveRepository(repo, getGitAuthor(), branchName, false, getGitAuthorCredsId()))
         // need to manually checkout branch since on a detached branch after checkout command
-        sh "git checkout ${getBuildBranch()}"
+        sh "git checkout ${branchName}"
         checkoutDatetime = getCheckoutDatetime()
         if (checkoutDatetime) {
-            sh "git checkout `git rev-list -n 1 --before=\"${checkoutDatetime}\" ${getBuildBranch()}`"
+            sh "git checkout `git rev-list -n 1 --before=\"${checkoutDatetime}\" ${branchName}`"
         }
     }
 }
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
index 6d0468aafd..b5e9d46688 100644
--- a/.ci/jenkins/dsl/jobs.groovy
+++ b/.ci/jenkins/dsl/jobs.groovy
@@ -445,6 +445,8 @@ void setupWeeklyDeployJob() {
         MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
         MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_URL}",
         MAVEN_REPO_CREDS_ID: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_CREDS_ID}",
+
+        DISABLE_DEPLOY: Utils.isDeployDisabled(this),
     ])
     KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
         parameters {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org