Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr 297 to main #298

Merged
merged 3 commits into from
May 7, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename var in jenkinsfile
deployableBranch is a better name chan supportedBranch
  • Loading branch information
bdemers committed May 7, 2021
commit 2588375ff9869dd25d269cdae6df626378924dad
10 changes: 5 additions & 5 deletions .jenkins.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

def supportedBranch = env.BRANCH_NAME ==~ /(1.7.x|1.8.x|main)/
def deployableBranch = env.BRANCH_NAME ==~ /(1.7.x|1.8.x|main)/

pipeline {

Expand Down Expand Up @@ -106,7 +106,7 @@ pipeline {
stage('Deploy') {
when {
allOf {
expression { supportedBranch }
expression { deployableBranch }
expression { MATRIX_JDK == 'jdk_11_latest' }
// is not a PR (GitHub) / MergeRequest (GitLab) / Change (Gerrit)?
not { changeRequest() }
Expand All @@ -125,7 +125,7 @@ pipeline {
// If this build failed, send an email to the list.
failure {
script {
if (supportedBranch) {
if (deployableBranch) {
emailext(
subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
body: """
Expand All @@ -142,7 +142,7 @@ Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANC
// If this build didn't fail, but there were failing tests, send an email to the list.
unstable {
script {
if (supportedBranch) {
if (deployableBranch) {
emailext(
subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
body: """
Expand All @@ -162,7 +162,7 @@ Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANC
// (in this cae we probably don't have to do any post-build analysis)
cleanWs()
script {
if (supportedBranch
if (deployableBranch
&& (currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
emailext(
subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
Expand Down