Browse Source

Fail the build if deploy fails

Fixes: gh-5997
Rob Winch 6 năm trước cách đây
mục cha
commit
d5d9adf11d
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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)