From 3d3fc284d993ad3037e3e06250ae35966e046276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Biarn=C3=A9s=20Kiefer?= Date: Wed, 2 Aug 2023 16:24:45 +0200 Subject: [PATCH] KOGITO-8115: Deploy jobs should deploy locally and then push to Nexus (#4886) --- .ci/jenkins/Jenkinsfile.deploy | 15 +-------------- .ci/jenkins/dsl/jobs.groovy | 6 ++++-- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index 2a44aa90b4db..28a800190592 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -112,20 +112,7 @@ pipeline { } } } - stage('Deploy to repository') { - when { - expression { return !shouldStageArtifacts() && shouldDeployToRepository() } - } - steps { - script { - runMavenDeploy() - } - } - } stage('Deploy locally') { - when { - expression { return shouldStageArtifacts() } - } steps { script { runMavenDeploy(true) @@ -221,7 +208,7 @@ void sendNotification() { } boolean shouldStageArtifacts() { - return isRelease() && !env.MAVEN_DEPLOY_REPOSITORY + return isRelease() } boolean shouldDeployToRepository() { diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index df99a480baf1..cabb8fb2d334 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -284,10 +284,12 @@ void setupDeployJob(JobType jobType) { AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", GITHUB_TOKEN_CREDS_ID: "${GIT_AUTHOR_TOKEN_CREDENTIALS_ID}", + MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}", MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}", - MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}", - + MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_URL}", + MAVEN_REPO_CREDS_ID: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_CREDS_ID}", + DROOLS_STREAM: getDroolsStream(), ]) if (jobType == JobType.RELEASE) {