Ver Fonte

Try this instead...

nossr50 há 2 dias atrás
pai
commit
fc62946e27
1 ficheiros alterados com 5 adições e 3 exclusões
  1. 5 3
      Jenkinsfile

+ 5 - 3
Jenkinsfile

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