zipkin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abe...@apache.org
Subject [incubator-zipkin-brave-karaf] 43/43: [jenkins] Tweaks, e-mail notification
Date Thu, 31 Jan 2019 10:31:50 GMT
This is an automated email from the ASF dual-hosted git repository.

abesto pushed a commit to branch jenkinsfile-tweaks
in repository https://gitbox.apache.org/repos/asf/incubator-zipkin-brave-karaf.git

commit abf35a026bdb451306247c879d90578adc93f4f0
Author: Zoltan Nagy <abesto@fb.com>
AuthorDate: Thu Jan 31 10:23:14 2019 +0000

    [jenkins] Tweaks, e-mail notification
    
    * Keep 30 builds instead of 10
    * Don't run any stages after tests if tests fail
    * Time out after 30 minutes
    * WIP code for releasing snapshots from master
    * Mail notifications on master build status change
---
 Jenkinsfile | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 90fa378..8a46e22 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -8,8 +8,12 @@ pipeline {
     }
 
     options {
-        buildDiscarder(logRotator(numToKeepStr: '10'))
+        buildDiscarder(logRotator(
+            numToKeepStr: '30',
+        ))
         timestamps()
+        skipStagesAfterUnstable()
+        timeout time: 30, unit: 'MINUTES'
     }
 
     stages {
@@ -35,13 +39,38 @@ pipeline {
                 sh './mvnw clean install'
             }
         }
-    }
 
+        /*
+        TODO uncomment and finish up the command here once we're ready to release snapshots
+        stage('Publish snapshot') {
+            when {
+                branch 'master'
+            }
+            steps {
+                sh './mvnw $TODO'
+            }
+        }
+         */
+    }
 
     post {
         always {
             junit '**/target/surefire-reports/*.xml'
             deleteDir()
         }
+
+        changed {
+            script {
+                if (env.BRANCH_NAME == 'master') {
+                    emailext(
+                        subject: "[${currentBuild.projectName}] master is ${currentBuild.currentResult}
(#${currentBuild.number})",
+                        to: 'notifications@zipkin.apache.org',
+                        replyTo: 'dev@zipkin.apache.org',
+                        body: "See <${currentBuild.absoluteUrl}>"
+                    )
+                }
+            }
+
+        }
     }
 }


Mime
View raw message