|
@@ -26,9 +26,11 @@ pipeline {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
stage('Deploy to Nexus') {
|
|
stage('Deploy to Nexus') {
|
|
|
- when {
|
|
|
|
|
- branch 'master'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ when {
|
|
|
|
|
+ expression {
|
|
|
|
|
+ return sh(script: 'git rev-parse --abbrev-ref HEAD', returnStdout: true).trim() == 'master'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
steps {
|
|
steps {
|
|
|
withCredentials([usernamePassword(
|
|
withCredentials([usernamePassword(
|
|
|
credentialsId: 'nexus-deployer',
|
|
credentialsId: 'nexus-deployer',
|