You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by bd...@apache.org on 2021/05/07 16:36:06 UTC
[shiro] 01/01: Use Jenkins matrix build config from main
This is an automated email from the ASF dual-hosted git repository.
bdemers pushed a commit to branch jenkins-matrix-1.8
in repository https://gitbox.apache.org/repos/asf/shiro.git
commit e3f87cdc9922d1318d069cd41d0c7b7bbb8b2f1c
Author: Brian Demers <bd...@apache.org>
AuthorDate: Fri May 7 12:35:53 2021 -0400
Use Jenkins matrix build config from main
Removes Jenkinsfile's adds .jenkins.groovy
---
.jenkins.groovy | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
Jenkinsfile | 181 ----------------------------------------------------
Jenkinsfile-jdk11 | 169 -------------------------------------------------
Jenkinsfile-jdk14 | 169 -------------------------------------------------
4 files changed, 186 insertions(+), 519 deletions(-)
diff --git a/.jenkins.groovy b/.jenkins.groovy
new file mode 100644
index 0000000..1ccd3a0
--- /dev/null
+++ b/.jenkins.groovy
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def deployableBranch = env.BRANCH_NAME ==~ /(1.7.x|1.8.x|main)/
+
+pipeline {
+
+ agent none
+
+ options {
+ // When we have test-fails e.g. we don't need to run the remaining steps
+ skipStagesAfterUnstable()
+ buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
+ }
+
+ stages {
+ stage('Build') {
+ matrix {
+ axes {
+ axis {
+ // https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix
+ name 'MATRIX_JDK'
+ values 'jdk_1.8_latest', 'adopt_hs_8_latest', 'adopt_j9_8_latest',
+ 'jdk_11_latest', 'adopt_hs_11_latest', 'adopt_j9_11_latest',
+ 'jdk_15_latest', 'adopt_hs_15_latest', 'adopt_j9_15_latest'
+ }
+ // Additional axess, like OS and maven version can be configured here.
+ }
+
+ agent {
+ node {
+ // https://cwiki.apache.org/confluence/display/INFRA/ci-builds.apache.org
+ label 'ubuntu'
+ }
+ }
+
+ options {
+ // Configure an overall timeout for the build of one hour.
+ timeout(time: 1, unit: 'HOURS')
+ }
+
+ tools {
+ // https://cwiki.apache.org/confluence/display/INFRA/Maven+Installation+Matrix
+ maven 'maven_3_latest'
+ jdk "${MATRIX_JDK}"
+ }
+
+ stages {
+ stage('Initialization') {
+ steps {
+ echo 'Building Branch: ' + env.BRANCH_NAME
+ echo 'Using PATH = ' + env.PATH
+ }
+ }
+
+ stage('Cleanup') {
+ steps {
+ echo 'Cleaning up the workspace'
+ cleanWs()
+ }
+ }
+
+ stage('Checkout') {
+ steps {
+ echo 'Checking out branch ' + env.BRANCH_NAME
+ checkout scm
+ }
+ }
+
+ stage('License check') {
+ steps {
+ echo 'License check'
+ sh 'mvn --batch-mode -Drat.consoleOutput=true apache-rat:check'
+ }
+ }
+
+ stage('Build') {
+ steps {
+ echo 'Building'
+ sh 'mvn --update-snapshots --batch-mode --errors clean verify -Pdocs -Dmaven.test.failure.ignore=true'
+ }
+ post {
+ always {
+ junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
+ junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
+ }
+ }
+ }
+
+ stage('Deploy') {
+ when {
+ allOf {
+ expression { deployableBranch }
+ expression { MATRIX_JDK == 'jdk_11_latest' }
+ // is not a PR (GitHub) / MergeRequest (GitLab) / Change (Gerrit)?
+ not { changeRequest() }
+ }
+ }
+ steps {
+ echo 'Deploying'
+ sh 'mvn --batch-mode clean deploy -Pdocs -DskipTests'
+ }
+ }
+
+ } // end of stages
+
+ // Do any post build stuff ... such as sending emails depending on the overall build result.
+ post {
+ // If this build failed, send an email to the list.
+ failure {
+ script {
+ if (deployableBranch) {
+ emailext(
+ subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+ body: """
+BUILD-FAILURE: 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: "dev@shiro.apache.org",
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+ )
+ }
+ }
+ }
+
+ // If this build didn't fail, but there were failing tests, send an email to the list.
+ unstable {
+ script {
+ if (deployableBranch) {
+ 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: "dev@shiro.apache.org",
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+ )
+ }
+ }
+ }
+
+ // Send an email, if the last build was not successful and this one is.
+ success {
+ // Cleanup the build directory if the build was successful
+ // (in this cae we probably don't have to do any post-build analysis)
+ cleanWs()
+ script {
+ if (deployableBranch
+ && (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: "dev@shiro.apache.org",
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+ )
+ }
+ }
+ }
+ } // end of post
+
+ } // end of matrix
+
+ } // main stage ('Build')
+
+ } // main stages
+}
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 42976bf..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,181 +0,0 @@
-#!groovy
-
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-pipeline {
-
- agent {
- node {
- label 'ubuntu'
- }
- }
-
- environment {
- // ... setup any environment variables ...
- MVN_LOCAL_REPO_OPT = '-Dmaven.repo.local=.repository'
- MVN_TEST_FAIL_IGNORE = '-Dmaven.test.failure.ignore=true'
- }
-
- tools {
- // ... tell Jenkins what java version, maven version or other tools are required ...
- maven 'maven_3_latest'
- jdk 'jdk_1.8_latest'
- }
-
- options {
- // Configure an overall timeout for the build of one hour.
- timeout(time: 1, unit: 'HOURS')
- // When we have test-fails e.g. we don't need to run the remaining steps
- skipStagesAfterUnstable()
- buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
- }
-
- stages {
- stage('Initialization') {
- steps {
- echo 'Building Branch: ' + env.BRANCH_NAME
- echo 'Using PATH = ' + env.PATH
- }
- }
-
- stage('Cleanup') {
- steps {
- echo 'Cleaning up the workspace'
- deleteDir()
- }
- }
-
- stage('Checkout') {
- steps {
- echo 'Checking out branch ' + env.BRANCH_NAME
- checkout scm
- }
- }
-
- stage('Apache Release Audit Tool') {
- steps {
- echo 'Rat'
- sh 'mvn -U -B -e apache-rat:check'
- }
- }
-
- stage('Build') {
- steps {
- echo 'Building'
- sh 'mvn -U -B -e ${MVN_LOCAL_REPO_OPT} clean install -DskipTests'
- }
- }
-
- stage('Tests') {
- steps {
- echo 'Running tests'
- sh 'mvn verify -Prun-its ${MVN_LOCAL_REPO_OPT} -Dinvoker.streamLogsOnFailures=true'
- }
- post {
- always {
- junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
- junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
- }
- }
- }
-
- stage('Generate doc') {
- when {
- expression {
- env.BRANCH_NAME ==~ /(1.7.x|1.8.x|main)/
- }
- }
- steps {
- echo 'Generate documentation'
- sh 'mvn javadoc:aggregate source:aggregate -Pdocs'
- }
- }
-
- stage('Deploy') {
- when {
- expression {
- env.BRANCH_NAME ==~ /(1.7.x|1.8.x|main)/
- }
- }
- steps {
- echo 'Deploying'
- sh 'mvn deploy'
- }
- }
- }
-
- // Do any post build stuff ... such as sending emails depending on the overall build result.
- post {
- // If this build failed, send an email to the list.
- failure {
- script {
- if(env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") {
- emailext(
- subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
- body: """
-BUILD-FAILURE: 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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
-
- // If this build didn't fail, but there were failing tests, send an email to the list.
- unstable {
- script {
- if(env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") {
- 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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
-
- // Send an email, if the last build was not successful and this one is.
- success {
- // Cleanup the build directory if the build was successful
- // (in this cae we probably don't have to do any post-build analysis)
- deleteDir()
- script {
- if ((env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") && (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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
- }
-
-}
diff --git a/Jenkinsfile-jdk11 b/Jenkinsfile-jdk11
deleted file mode 100644
index 0898d77..0000000
--- a/Jenkinsfile-jdk11
+++ /dev/null
@@ -1,169 +0,0 @@
-#!groovy
-
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-pipeline {
-
- agent {
- node {
- label 'ubuntu'
- }
- }
-
- environment {
- // ... setup any environment variables ...
- MVN_LOCAL_REPO_OPT = '-Dmaven.repo.local=.repository'
- MVN_TEST_FAIL_IGNORE = '-Dmaven.test.failure.ignore=true'
- }
-
- tools {
- // ... tell Jenkins what java version, maven version or other tools are required ...
- maven 'maven_3_latest'
- jdk 'jdk_11_latest'
- }
-
- options {
- // Configure an overall timeout for the build of one hour.
- timeout(time: 1, unit: 'HOURS')
- // When we have test-fails e.g. we don't need to run the remaining steps
- skipStagesAfterUnstable()
- buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
- }
-
- stages {
- stage('Initialization') {
- steps {
- echo 'Building Branch: ' + env.BRANCH_NAME
- echo 'Using PATH = ' + env.PATH
- }
- }
-
- stage('Cleanup') {
- steps {
- echo 'Cleaning up the workspace'
- deleteDir()
- }
- }
-
- stage('Checkout') {
- steps {
- echo 'Checking out branch ' + env.BRANCH_NAME
- checkout scm
- }
- }
-
- stage('Apache Release Audit Tool') {
- steps {
- echo 'Rat'
- sh 'mvn -U -B -e apache-rat:check'
- }
- }
-
- stage('Build') {
- steps {
- echo 'Building'
- sh 'mvn -U -B -e ${MVN_LOCAL_REPO_OPT} clean install -DskipTests'
- }
- }
-
- stage('Tests') {
- steps {
- echo 'Running tests'
- sh 'mvn verify -Prun-its ${MVN_LOCAL_REPO_OPT} -Dinvoker.streamLogsOnFailures=true'
- }
- post {
- always {
- junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
- junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
- }
- }
- }
-
- stage('Generate doc') {
- when {
- expression {
- env.BRANCH_NAME ==~ /(1.7.x|1.8.x|main)/
- }
- }
- steps {
- echo 'Generate documentation'
- sh 'mvn javadoc:aggregate source:aggregate -Pdocs'
- }
- }
- }
-
- // Do any post build stuff ... such as sending emails depending on the overall build result.
- post {
- // If this build failed, send an email to the list.
- failure {
- script {
- if(env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") {
- emailext(
- subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
- body: """
-BUILD-FAILURE: 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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
-
- // If this build didn't fail, but there were failing tests, send an email to the list.
- unstable {
- script {
- if(env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") {
- 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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
-
- // Send an email, if the last build was not successful and this one is.
- success {
- // Cleanup the build directory if the build was successful
- // (in this cae we probably don't have to do any post-build analysis)
- deleteDir()
- script {
- if ((env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") && (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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
- }
-
-}
diff --git a/Jenkinsfile-jdk14 b/Jenkinsfile-jdk14
deleted file mode 100644
index 235475c..0000000
--- a/Jenkinsfile-jdk14
+++ /dev/null
@@ -1,169 +0,0 @@
-#!groovy
-
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-pipeline {
-
- agent {
- node {
- label 'ubuntu'
- }
- }
-
- environment {
- // ... setup any environment variables ...
- MVN_LOCAL_REPO_OPT = '-Dmaven.repo.local=.repository'
- MVN_TEST_FAIL_IGNORE = '-Dmaven.test.failure.ignore=true'
- }
-
- tools {
- // ... tell Jenkins what java version, maven version or other tools are required ...
- maven 'maven_3_latest'
- jdk 'jdk_14_latest'
- }
-
- options {
- // Configure an overall timeout for the build of one hour.
- timeout(time: 1, unit: 'HOURS')
- // When we have test-fails e.g. we don't need to run the remaining steps
- skipStagesAfterUnstable()
- buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
- }
-
- stages {
- stage('Initialization') {
- steps {
- echo 'Building Branch: ' + env.BRANCH_NAME
- echo 'Using PATH = ' + env.PATH
- }
- }
-
- stage('Cleanup') {
- steps {
- echo 'Cleaning up the workspace'
- deleteDir()
- }
- }
-
- stage('Checkout') {
- steps {
- echo 'Checking out branch ' + env.BRANCH_NAME
- checkout scm
- }
- }
-
- stage('Apache Release Audit Tool') {
- steps {
- echo 'Rat'
- sh 'mvn -U -B -e apache-rat:check'
- }
- }
-
- stage('Build') {
- steps {
- echo 'Building'
- sh 'mvn -U -B -e ${MVN_LOCAL_REPO_OPT} clean install -DskipTests'
- }
- }
-
- stage('Tests') {
- steps {
- echo 'Running tests'
- sh 'mvn verify -Prun-its ${MVN_LOCAL_REPO_OPT} -Dinvoker.streamLogsOnFailures=true'
- }
- post {
- always {
- junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
- junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
- }
- }
- }
-
- stage('Generate doc') {
- when {
- expression {
- env.BRANCH_NAME ==~ /(1.7.x|1.8.x|main)/
- }
- }
- steps {
- echo 'Generate documentation'
- sh 'mvn javadoc:aggregate source:aggregate -Pdocs'
- }
- }
- }
-
- // Do any post build stuff ... such as sending emails depending on the overall build result.
- post {
- // If this build failed, send an email to the list.
- failure {
- script {
- if(env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") {
- emailext(
- subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
- body: """
-BUILD-FAILURE: 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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
-
- // If this build didn't fail, but there were failing tests, send an email to the list.
- unstable {
- script {
- if(env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") {
- 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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
-
- // Send an email, if the last build was not successful and this one is.
- success {
- // Cleanup the build directory if the build was successful
- // (in this cae we probably don't have to do any post-build analysis)
- deleteDir()
- script {
- if ((env.BRANCH_NAME == "1.7.x" || env.BRANCH_NAME == "1.8.x" || env.BRANCH_NAME == "main") && (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: "dev@shiro.apache.org",
- recipientProviders: [[$class: 'DevelopersRecipientProvider']]
- )
- }
- }
- }
- }
-
-}