You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/04/07 02:31:05 UTC
[james-site] 04/08: [JAMES-3226] Automatically publish staging doc
(#11)
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch live
in repository https://gitbox.apache.org/repos/asf/james-site.git
commit b94945499cdbc37120729d2173e8e4eb754a6337
Author: Tellier Benoit <bt...@linagora.com>
AuthorDate: Fri Apr 2 18:19:12 2021 +0700
[JAMES-3226] Automatically publish staging doc (#11)
This enables building and publishing the antora documentation
automatically when the build of the master branche of james-project is
green.
Co-authored-by: Jean Helou <jh...@codamens.fr>
---
Jenkinsfile | 74 +++++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 52 insertions(+), 22 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 52ea02c..f7659e9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -28,8 +28,12 @@ pipeline {
label AGENT_LABEL
}
+ triggers {
+ upstream(upstreamProjects: '../ApacheJames/master', threshold: hudson.model.Result.SUCCESS)
+ }
+
environment {
- CI=true
+ CI = true
}
tools {
@@ -88,17 +92,29 @@ pipeline {
failure {
echo "Failed "
script {
- emailext(
- subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
- body: """
-BUILD-UNSTABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
-
-Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"
-""",
- to: "server-dev@james.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
+ if (env.BRANCH_NAME == "live" || env.BRANCH_NAME == "staging") {
+ emailext(
+ subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+ body: """
+ BUILD-UNSTABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
+
+ Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"
+ """,
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+ )
+ } else {
+ emailext(
+ subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+ body: """
+ BUILD-UNSTABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
+
+ Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"
+ """,
+ recipientProviders: [[$class: 'RequesterRecipientProvider']]
+ )
+ }
}
+
}
// If this build didn't fail, but there were failing tests, send an email to the list.
@@ -110,17 +126,31 @@ Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANC
success {
echo "Success "
script {
- if ((currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
- emailext (
- subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
- body: """
-BUILD-STABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
-
-Is back to normal.
-""",
- to: "server-dev@james.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
+ if (env.BRANCH_NAME == "live" || env.BRANCH_NAME == "staging") {
+
+ if ((currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
+ emailext(
+ subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+ body: """
+ BUILD-STABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
+
+ Is back to normal.
+ """,
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+ )
+ }
+ } else {
+ if ((currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
+ emailext(
+ subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+ body: """
+ BUILD-STABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
+
+ Is back to normal.
+ """,
+ recipientProviders: [[$class: 'RequesterRecipientProvider']]
+ )
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org