From 5037c5313c6f584a08b99518f3c15fd8b2d48aa0 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 11 Feb 2021 17:48:58 +0000 Subject: [PATCH 1/2] ci: use the releaseNotification step --- Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 60cf484d5..b08815c22 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -532,9 +532,10 @@ def runTest(){ } def notifyStatus(def args = [:]) { - slackSend(channel: '#apm-agent-js', color: args.slackStatus, message: "${args.subject}. ${args.body}", - tokenCredentialId: 'jenkins-slack-integration-token') - // transform slack URL format '()' to 'URL'. - def bodyEmail = args.body.replaceAll('\\(<', '').replaceAll('\\|.*>\\)', '') - emailext(subject: args.subject, to: "${env.NOTIFY_TO}", body: bodyEmail) + releaseNotification(slackChannel: "${env.SLACK_CHANNEL}", + slackColor: args.slackStatus, + slackCredentialsId: 'jenkins-slack-integration-token', + to: "${env.NOTIFY_TO}", + subject: args.subject, + body: args.body) } From b93d32157f697df9eebe428aa1e927468fa09365 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 15 Feb 2021 16:05:12 +0000 Subject: [PATCH 2/2] ci: use slack channel --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b08815c22..4b66e812e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -532,7 +532,7 @@ def runTest(){ } def notifyStatus(def args = [:]) { - releaseNotification(slackChannel: "${env.SLACK_CHANNEL}", + releaseNotification(slackChannel: '#apm-agent-js', slackColor: args.slackStatus, slackCredentialsId: 'jenkins-slack-integration-token', to: "${env.NOTIFY_TO}",