Skip to content

Commit

Permalink
KOGITO-8115: Deploy jobs should deploy locally and then push to Nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
mbiarnes committed Aug 2, 2023
1 parent f35559b commit cd8a000
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
15 changes: 1 addition & 14 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -225,7 +212,7 @@ void sendNotification() {
}

boolean shouldStageArtifacts() {
return isRelease() && !env.MAVEN_DEPLOY_REPOSITORY
return isRelease()
}

boolean shouldDeployToRepository() {
Expand Down
6 changes: 4 additions & 2 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cd8a000

Please sign in to comment.