Просмотр исходного кода

Fail the build if deploy fails

Fixes: gh-5997
Rob Winch 6 лет назад
Родитель
Сommit
d5d9adf11d
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      Jenkinsfile

+ 3 - 0
Jenkinsfile

@@ -121,6 +121,9 @@ try {
 			}
 		}
 	}
+} catch(Exception e) {
+	currentBuild.result = 'FAILED: deploys'
+	throw e
 } finally {
 	def buildStatus = currentBuild.result
 	def buildNotSuccess =  !SUCCESS.equals(buildStatus)