Sfoglia il codice sorgente

Try email only on master branch (#47)

Joe Green 9 anni fa
parent
commit
38b3626014
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      services/web/Jenkinsfile

+ 4 - 0
services/web/Jenkinsfile

@@ -160,6 +160,10 @@ pipeline {
   
   
   post {
   post {
     failure {
     failure {
+      when {
+        branch 'master'
+      }
+      
       mail(from: "${EMAIL_ALERT_FROM}", 
       mail(from: "${EMAIL_ALERT_FROM}", 
            to: "${EMAIL_ALERT_TO}", 
            to: "${EMAIL_ALERT_TO}", 
            subject: "Jenkins build failed: ${JOB_NAME}:${BUILD_NUMBER}",
            subject: "Jenkins build failed: ${JOB_NAME}:${BUILD_NUMBER}",