Procházet zdrojové kódy

Try this instead...

nossr50 před 2 dny
rodič
revize
fc62946e27
1 změnil soubory, kde provedl 5 přidání a 3 odebrání
  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',