Skip to content

Commit

Permalink
fixes release pipeline to use managed credentials from jenkins ci for…
Browse files Browse the repository at this point in the history
… connecting to github and nexus
  • Loading branch information
tfr42 committed Dec 27, 2024
1 parent e4ea78d commit f5febc7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ pipeline {
}
steps {
echo 'Prepare release version ${REL_VERSION}'
sh 'mvn -Dresume=false -DreleaseVersion=${REL_VERSION} -DdevelopmentVersion=${DEV_VERSION} -DdeployAtEnd=true -Dgoals=deploy release:prepare release:perform -P integration-tests,oracle,handbook'
withMaven(mavenSettingsConfig: 'mvn-server-settings', options: [junitPublisher(healthScaleFactor: 1.0)], publisherStrategy: 'EXPLICIT') {
withCredentials([usernamePassword(credentialsId:'nexus-deploy', passwordVariable: 'PASSWORD_VAR', usernameVariable: 'USERNAME_VAR')]) {
sshagent(credentials: ['jenkins-deegree-ssh-key']) {
sh 'mvn -Dresume=false -DreleaseVersion=${REL_VERSION} -DdevelopmentVersion=${DEV_VERSION} -Darguments="-Drepo.username=${USERNAME_VAR} -Drepo.password=${PASSWORD_VAR}" -DdeployAtEnd=true -Dgoals=deploy release:prepare release:perform -P integration-tests,oracle,handbook'
}
}
}
}
post {
success {
Expand All @@ -85,4 +91,4 @@ pipeline {
cleanWs notFailBuild: true
}
}
}
}

0 comments on commit f5febc7

Please sign in to comment.