From 079515354888a71a145afa3dfc778d3d5fcb31ce Mon Sep 17 00:00:00 2001 From: Vojtech Juranek Date: Wed, 4 Jan 2023 13:54:58 +0100 Subject: [PATCH] DBZ-5974 Show pipeline status directly in email subject --- jenkins-jobs/pipelines/aro_deployment_pipeline.groovy | 2 +- jenkins-jobs/pipelines/aro_teardown_pipeline.groovy | 2 +- jenkins-jobs/pipelines/build_debezium_images_pipeline.groovy | 2 +- .../pipelines/build_debezium_tool_images_pipeline.groovy | 2 +- jenkins-jobs/pipelines/cluster_deployment_pipeline.groovy | 2 +- jenkins-jobs/pipelines/deploy_snapshots_pipeline.groovy | 2 +- .../downstream_artifact_server_prepare_pipeline.groovy | 2 +- jenkins-jobs/pipelines/downstream_prepare_pipeline.groovy | 2 +- jenkins-jobs/pipelines/node_snapshot_build_pipeline.groovy | 2 +- .../pipelines/node_snapshot_history_cleanup_pipeline.groovy | 2 +- jenkins-jobs/pipelines/prod-release-pipeline.groovy | 2 +- jenkins-jobs/pipelines/release-pipeline.groovy | 2 +- jenkins-jobs/pipelines/rhel_downstream_prepare_pipeline.groovy | 2 +- jenkins-jobs/pipelines/system_pipeline.groovy | 2 +- .../pipelines/upstream_artifact_server_prepare_pipeline.groovy | 2 +- .../pipelines/upstream_kafka_connect_prepare_pipeline.groovy | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/jenkins-jobs/pipelines/aro_deployment_pipeline.groovy b/jenkins-jobs/pipelines/aro_deployment_pipeline.groovy index ebe8e1a15..7bedb1af4 100644 --- a/jenkins-jobs/pipelines/aro_deployment_pipeline.groovy +++ b/jenkins-jobs/pipelines/aro_deployment_pipeline.groovy @@ -129,7 +129,7 @@ pipeline { } always { script { - mail to: 'debezium-qe@redhat.com', subject: "ARO cluster deployment #${env.BUILD_NUMBER} finished", + mail to: 'debezium-qe@redhat.com', subject: "ARO cluster deployment #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ diff --git a/jenkins-jobs/pipelines/aro_teardown_pipeline.groovy b/jenkins-jobs/pipelines/aro_teardown_pipeline.groovy index bc1847440..e2b39fdde 100644 --- a/jenkins-jobs/pipelines/aro_teardown_pipeline.groovy +++ b/jenkins-jobs/pipelines/aro_teardown_pipeline.groovy @@ -34,7 +34,7 @@ pipeline { post { always { script { - mail to: 'debezium-qe@redhat.com', subject: "ARO cluster teardown #${env.BUILD_NUMBER} finished", + mail to: 'debezium-qe@redhat.com', subject: "ARO cluster teardown #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ diff --git a/jenkins-jobs/pipelines/build_debezium_images_pipeline.groovy b/jenkins-jobs/pipelines/build_debezium_images_pipeline.groovy index 79b51ef5e..cb30246f7 100644 --- a/jenkins-jobs/pipelines/build_debezium_images_pipeline.groovy +++ b/jenkins-jobs/pipelines/build_debezium_images_pipeline.groovy @@ -200,5 +200,5 @@ node('Slave') { } } - mail to: params.MAIL_TO, subject: "${env.JOB_NAME} run #${env.BUILD_NUMBER} finished", body: "Run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult}" + mail to: params.MAIL_TO, subject: "${env.JOB_NAME} run #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: "Run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult}" } diff --git a/jenkins-jobs/pipelines/build_debezium_tool_images_pipeline.groovy b/jenkins-jobs/pipelines/build_debezium_tool_images_pipeline.groovy index 70c2e9f15..bbcd6aba4 100644 --- a/jenkins-jobs/pipelines/build_debezium_tool_images_pipeline.groovy +++ b/jenkins-jobs/pipelines/build_debezium_tool_images_pipeline.groovy @@ -41,5 +41,5 @@ node('Slave') { } } - mail to: params.MAIL_TO, subject: "${env.JOB_NAME} run #${env.BUILD_NUMBER} finished", body: "Run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult}" + mail to: params.MAIL_TO, subject: "${env.JOB_NAME} run #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: "Run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult}" } diff --git a/jenkins-jobs/pipelines/cluster_deployment_pipeline.groovy b/jenkins-jobs/pipelines/cluster_deployment_pipeline.groovy index 8af8eb97c..5869a4593 100644 --- a/jenkins-jobs/pipelines/cluster_deployment_pipeline.groovy +++ b/jenkins-jobs/pipelines/cluster_deployment_pipeline.groovy @@ -114,7 +114,7 @@ pipeline { post { always { - mail to: 'debezium-qe@redhat.com', subject: "OCP cluster deployment/removal #${env.BUILD_NUMBER} finished", body: """ + mail to: 'debezium-qe@redhat.com', subject: "OCP cluster deployment/removal #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ } diff --git a/jenkins-jobs/pipelines/deploy_snapshots_pipeline.groovy b/jenkins-jobs/pipelines/deploy_snapshots_pipeline.groovy index 234eae243..7fc7bbe51 100644 --- a/jenkins-jobs/pipelines/deploy_snapshots_pipeline.groovy +++ b/jenkins-jobs/pipelines/deploy_snapshots_pipeline.groovy @@ -68,5 +68,5 @@ node('Slave') { } } - mail to: params.MAIL_TO, subject: "${env.JOB_NAME} run #${env.BUILD_NUMBER} finished", body: "Run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult}" + mail to: params.MAIL_TO, subject: "${env.JOB_NAME} run #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: "Run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult}" } diff --git a/jenkins-jobs/pipelines/downstream_artifact_server_prepare_pipeline.groovy b/jenkins-jobs/pipelines/downstream_artifact_server_prepare_pipeline.groovy index d6f81e517..13316a4e6 100644 --- a/jenkins-jobs/pipelines/downstream_artifact_server_prepare_pipeline.groovy +++ b/jenkins-jobs/pipelines/downstream_artifact_server_prepare_pipeline.groovy @@ -49,7 +49,7 @@ pipeline { post { always { - mail to: params.MAIL_TO, subject: "Debezium artifact server preparation #${env.BUILD_NUMBER} finished", body: """ + mail to: params.MAIL_TO, subject: "Debezium artifact server preparation #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ } diff --git a/jenkins-jobs/pipelines/downstream_prepare_pipeline.groovy b/jenkins-jobs/pipelines/downstream_prepare_pipeline.groovy index 8f7f07c04..770a5bb5e 100644 --- a/jenkins-jobs/pipelines/downstream_prepare_pipeline.groovy +++ b/jenkins-jobs/pipelines/downstream_prepare_pipeline.groovy @@ -95,7 +95,7 @@ pipeline { post { always { - mail to: params.MAIL_TO, subject: "Debezium OpenShift test run #${env.BUILD_NUMBER} finished", body: """ + mail to: params.MAIL_TO, subject: "Debezium OpenShift test run #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ } diff --git a/jenkins-jobs/pipelines/node_snapshot_build_pipeline.groovy b/jenkins-jobs/pipelines/node_snapshot_build_pipeline.groovy index e431b8ab0..8355a75fc 100644 --- a/jenkins-jobs/pipelines/node_snapshot_build_pipeline.groovy +++ b/jenkins-jobs/pipelines/node_snapshot_build_pipeline.groovy @@ -63,7 +63,7 @@ pipeline { post { always { - mail to: 'debezium-qe@redhat.com', subject: "Jenkins node image snapshot #${env.BUILD_NUMBER} finished", body: """ + mail to: 'debezium-qe@redhat.com', subject: "Jenkins node image snapshot #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ } diff --git a/jenkins-jobs/pipelines/node_snapshot_history_cleanup_pipeline.groovy b/jenkins-jobs/pipelines/node_snapshot_history_cleanup_pipeline.groovy index f8c8cf013..7633eb568 100644 --- a/jenkins-jobs/pipelines/node_snapshot_history_cleanup_pipeline.groovy +++ b/jenkins-jobs/pipelines/node_snapshot_history_cleanup_pipeline.groovy @@ -40,7 +40,7 @@ pipeline { } post { always { - mail to: 'debezium-qe@redhat.com', subject: "Jenkins node image snapshot history cleanup #${env.BUILD_NUMBER} finished", body: """ + mail to: 'debezium-qe@redhat.com', subject: "Jenkins node image snapshot history cleanup #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ } diff --git a/jenkins-jobs/pipelines/prod-release-pipeline.groovy b/jenkins-jobs/pipelines/prod-release-pipeline.groovy index e142508fa..68bc28bd2 100644 --- a/jenkins-jobs/pipelines/prod-release-pipeline.groovy +++ b/jenkins-jobs/pipelines/prod-release-pipeline.groovy @@ -96,5 +96,5 @@ node('Slave') { } } - mail to: MAIL_TO, subject: "${JOB_NAME} run #${BUILD_NUMBER} finished", body: "Run ${BUILD_URL} finished with result: ${currentBuild.currentResult}" + mail to: MAIL_TO, subject: "${JOB_NAME} run #${BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: "Run ${BUILD_URL} finished with result: ${currentBuild.currentResult}" } diff --git a/jenkins-jobs/pipelines/release-pipeline.groovy b/jenkins-jobs/pipelines/release-pipeline.groovy index ae83c24f8..7c136437d 100644 --- a/jenkins-jobs/pipelines/release-pipeline.groovy +++ b/jenkins-jobs/pipelines/release-pipeline.groovy @@ -745,5 +745,5 @@ node('Slave') { } - mail to: MAIL_TO, subject: "${JOB_NAME} run #${BUILD_NUMBER} finished", body: "Run ${BUILD_URL} finished with result: ${currentBuild.currentResult}" + mail to: MAIL_TO, subject: "${JOB_NAME} run #${BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: "Run ${BUILD_URL} finished with result: ${currentBuild.currentResult}" } diff --git a/jenkins-jobs/pipelines/rhel_downstream_prepare_pipeline.groovy b/jenkins-jobs/pipelines/rhel_downstream_prepare_pipeline.groovy index 2a20113ba..c9261bc09 100644 --- a/jenkins-jobs/pipelines/rhel_downstream_prepare_pipeline.groovy +++ b/jenkins-jobs/pipelines/rhel_downstream_prepare_pipeline.groovy @@ -52,7 +52,7 @@ pipeline { post { always { - mail to: params.MAIL_TO, subject: "Rhel downstream preparation #${env.BUILD_NUMBER} finished", body: """ + mail to: params.MAIL_TO, subject: "Rhel downstream preparation #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ } diff --git a/jenkins-jobs/pipelines/system_pipeline.groovy b/jenkins-jobs/pipelines/system_pipeline.groovy index c40e42b09..742d43dfc 100644 --- a/jenkins-jobs/pipelines/system_pipeline.groovy +++ b/jenkins-jobs/pipelines/system_pipeline.groovy @@ -272,7 +272,7 @@ pipeline { archiveArtifacts '**/target/failsafe-reports/*.xml' junit '**/target/failsafe-reports/*.xml' - mail to: params.MAIL_TO, subject: "Debezium OpenShift test run #${env.BUILD_NUMBER} finished", body: """ + mail to: params.MAIL_TO, subject: "Debezium OpenShift test run #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ OpenShift interoperability test run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ withCredentials([ diff --git a/jenkins-jobs/pipelines/upstream_artifact_server_prepare_pipeline.groovy b/jenkins-jobs/pipelines/upstream_artifact_server_prepare_pipeline.groovy index 3116ad917..eef4dc594 100644 --- a/jenkins-jobs/pipelines/upstream_artifact_server_prepare_pipeline.groovy +++ b/jenkins-jobs/pipelines/upstream_artifact_server_prepare_pipeline.groovy @@ -133,7 +133,7 @@ pipeline { post { always { - mail to: params.MAIL_TO, subject: "Debezium upstream artifact server preparation #${env.BUILD_NUMBER} finished", body: """ + mail to: params.MAIL_TO, subject: "Debezium upstream artifact server preparation #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ } diff --git a/jenkins-jobs/pipelines/upstream_kafka_connect_prepare_pipeline.groovy b/jenkins-jobs/pipelines/upstream_kafka_connect_prepare_pipeline.groovy index abdeae57d..da77c2bc6 100644 --- a/jenkins-jobs/pipelines/upstream_kafka_connect_prepare_pipeline.groovy +++ b/jenkins-jobs/pipelines/upstream_kafka_connect_prepare_pipeline.groovy @@ -136,7 +136,7 @@ pipeline { post { always { - mail to: params.MAIL_TO, subject: "Debezium upstream kafka connect image preparation #${env.BUILD_NUMBER} finished", body: """ + mail to: params.MAIL_TO, subject: "Debezium upstream kafka connect image preparation #${env.BUILD_NUMBER} finished with ${currentBuild.currentResult}", body: """ ${currentBuild.projectName} run ${env.BUILD_URL} finished with result: ${currentBuild.currentResult} """ }