From 2fccf1f7c6c97b498783d4895a75c4b7e185d20d Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 14 Jun 2020 21:57:40 -0400 Subject: [PATCH] Update timeouts in Jenkinsfile, and add emailing results, for xaibox build --- dockerfiles/services/nextcloud/Jenkinsfile | 29 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/dockerfiles/services/nextcloud/Jenkinsfile b/dockerfiles/services/nextcloud/Jenkinsfile index 8c782f0..356aadb 100644 --- a/dockerfiles/services/nextcloud/Jenkinsfile +++ b/dockerfiles/services/nextcloud/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { buildDiscarder(logRotator(numToKeepStr: '2')) } triggers { - cron('@weekly') + cron('@monthly') } stages { @@ -23,7 +23,7 @@ pipeline { stage('build') { options { ansiColor('xterm') - timeout(2) + timeout(5) } steps { dir(WORKDIR) { @@ -38,7 +38,7 @@ pipeline { stage('deploy') { options { ansiColor('xterm') - timeout(2) + timeout(5) } steps { dir(WORKDIR) { @@ -51,7 +51,7 @@ pipeline { failure { dir(WORKDIR) { withDockerRegistry(credentialsId: 'b11d7f1a-81ac-4daf-8842-56afc0d2370e', url: 'http://dkregistry.xai-corp.net:5000') { - sh "xai rollback" +// sh "xai rollback" } } } @@ -59,4 +59,25 @@ pipeline { } } + post { + always { + emailext attachLog: true, + body: "Job completed: \n ${JOB_URL}", + subject: "Jenkins: Job: $JOB_NAME $BUILD_DISPLAY_NAME", + to: 'r_morgan@sympatico.ca' + } + unsuccessful { + emailext attachLog: true, + body: "Job failed to complete: \n ${JOB_URL}", + subject: "Jenkins: Job Failed: $JOB_NAME $BUILD_DISPLAY_NAME ", + to: 'r_morgan@sympatico.ca' + } + changed { + emailext attachLog: true, + body: 'Job failed to complete:', + subject: "Jenkins: Job Failed: $JOB_NAME $BUILD_DISPLAY_NAME", + to: 'r_morgan@sympatico.ca' + } + } + }