From 69080b6b751662553460eb109a5bc388f0f66010 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Jun 06 2017 06:24:03 +0000 Subject: [PATCH 1/2] Jenkins mail plugin wants recipients separated by comma, not semicolon --- diff --git a/Jenkinsfile b/Jenkinsfile index c4123ad..439a72c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -157,7 +157,7 @@ node('fedora') { } catch (e) { if (ownership.job.ownershipEnabled) { mail to: ownership.job.primaryOwnerEmail, - cc: ownership.job.secondaryOwnerEmails.join(';'), + cc: ownership.job.secondaryOwnerEmails.join(', '), subject: "Jenkins job ${env.JOB_NAME} #${env.BUILD_NUMBER} failed", body: "${env.BUILD_URL}\n\n${e}" } From 6e66f9b3a4756b44ce75cb8f954af4736063485e Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Jun 06 2017 06:29:40 +0000 Subject: [PATCH 2/2] Jenkinsfile: don't attempt to push empty commits to Pagure Currently this fails if the build produces the same docs output as the previous build. It tries to create an empty commit which git doesn't allow by default. In that case we can just skip the commit and push. --- diff --git a/Jenkinsfile b/Jenkinsfile index 439a72c..e5b2694 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,6 +41,9 @@ node('fedora') { cp -r docs/_build/html/* docs-on-pagure/ cd docs-on-pagure git add -A . + if [[ "$(git diff --cached --numstat | wc -l)" -eq 0 ]] ; then + exit 0 # No changes, nothing to commit + fi git commit -m 'Automatic commit of docs built by Jenkins job ${env.JOB_NAME} #${env.BUILD_NUMBER}' git push origin master """