소스 검색

Try this instead...

nossr50 2 일 전
부모
커밋
fc62946e27
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  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',