From 9bda96ff0a9d5a8318a3e1a8b1300b95396fa05a Mon Sep 17 00:00:00 2001 From: ronanbrowne88 Date: Sun, 1 May 2022 11:27:44 +0100 Subject: [PATCH 1/3] INFRA-1746 add slack notifications --- .ci/dev/regression/Jenkinsfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.ci/dev/regression/Jenkinsfile b/.ci/dev/regression/Jenkinsfile index b41c57aaff..249844847b 100644 --- a/.ci/dev/regression/Jenkinsfile +++ b/.ci/dev/regression/Jenkinsfile @@ -421,6 +421,21 @@ pipeline { } } } + success { + script { + sendSlackNotifications("good", "BUILD PASSED", false, "#corda-corda4-build-notifications") + } + } + unstable { + script { + sendSlackNotifications("warning", "BUILD UNSTABLE - Unstable Builds are likely a result of Nexus Sonar Scanner violations", false, "#corda-corda4-build-notifications") + } + } + failure { + script { + sendSlackNotifications("danger", "BUILD FAILURE", true, "#corda-corda4-build-notifications") + } + } cleanup { deleteDir() /* clean up our workspace */ } From 7ce0ab2789a8ea5ee949ba02c2511abdb4dcd173 Mon Sep 17 00:00:00 2001 From: ronanbrowne88 Date: Sun, 1 May 2022 11:35:50 +0100 Subject: [PATCH 2/3] INFRA-1746 tidy up --- .ci/dev/regression/Jenkinsfile | 35 ---------------------------------- 1 file changed, 35 deletions(-) diff --git a/.ci/dev/regression/Jenkinsfile b/.ci/dev/regression/Jenkinsfile index 249844847b..06aa479a0e 100644 --- a/.ci/dev/regression/Jenkinsfile +++ b/.ci/dev/regression/Jenkinsfile @@ -41,17 +41,6 @@ def nexusIqStageChoices = [nexusDefaultIqStage].plus( 'operate' ].minus([nexusDefaultIqStage])) -/** - * define an empty teamsWebHookURL and if it is a Release Branch - * then set it for the Corda 4 Jenkins Connector - */ -def teamsWebHookURL = "" -if (isReleaseBranch || isReleaseTag){ - withCredentials([string(credentialsId: 'ms-teams-webhook', variable: 'webhook_url')]) { - teamsWebHookURL = "$webhook_url" - } -} - /** * Common Gradle arguments for all Gradle executions */ @@ -72,33 +61,9 @@ pipeline { */ options { buildDiscarder(logRotator(daysToKeepStr: '14', artifactDaysToKeepStr: '14')) - office365ConnectorWebhooks([[ - name : "Corda 4 Jenkins Connector", - notifyBackToNormal : true, - startNotification : false, - notifyFailure : true, - notifySuccess : true, - notifyNotBuilt : false, - notifyAborted : false, - notifyRepeatedFailure: true, - notifyUnstable : true, - url : "${teamsWebHookURL}" - ]]) parallelsAlwaysFailFast() timeout(time: 6, unit: 'HOURS') timestamps() - office365ConnectorWebhooks([[ - name : "Corda 4 Jenkins Connector", - notifyBackToNormal : true, - startNotification : false, - notifyFailure : true, - notifySuccess : true, - notifyNotBuilt : false, - notifyAborted : false, - notifyRepeatedFailure: true, - notifyUnstable : true, - url : "${teamsWebHookURL}" - ]]) } parameters { From 444a1b8fd502100dde91eee200bc83f106e6747a Mon Sep 17 00:00:00 2001 From: Ronan Browne Date: Mon, 2 May 2022 11:40:59 +0100 Subject: [PATCH 3/3] NOTICK: add shared library call --- .ci/dev/regression/Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/dev/regression/Jenkinsfile b/.ci/dev/regression/Jenkinsfile index 06aa479a0e..ffdddd0c00 100644 --- a/.ci/dev/regression/Jenkinsfile +++ b/.ci/dev/regression/Jenkinsfile @@ -3,6 +3,7 @@ * Jenkins pipeline to build Corda OS release branches and tags. * PLEASE NOTE: we DO want to run a build for each commit!!! */ +@Library('corda-shared-build-pipeline-steps') /** * Sense environment