From 88a122c618f91ac169e54543ace1b21fc1ef00f6 Mon Sep 17 00:00:00 2001 From: jakubgs Date: Tue, 27 Sep 2022 19:20:55 +0000 Subject: [PATCH] deploy: af3bac2949e2ab8b18690ce4af89fcc8582f94c8 --- ci/Jenkinsfile.prs | 2 +- ci/Jenkinsfile.release | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ci/Jenkinsfile.prs b/ci/Jenkinsfile.prs index 9e69d6d30..b33690ca0 100644 --- a/ci/Jenkinsfile.prs +++ b/ci/Jenkinsfile.prs @@ -125,7 +125,7 @@ def versionWasChanged(version) { script: "git diff --name-only origin/${env.CHANGE_TARGET}", returnStdout: true ) - if (changes =~ "(?m)^(Makefile|waku.nimble|config.nims|vendor).*") { + if (changes =~ "(?m)^(Makefile|waku.nimble|config.nims|vendor|ci).*") { return true } if (changes =~ "(?m)^(waku|tests|examples)/(${version}|common)/.*") { diff --git a/ci/Jenkinsfile.release b/ci/Jenkinsfile.release index 6da215a23..48a3ff036 100644 --- a/ci/Jenkinsfile.release +++ b/ci/Jenkinsfile.release @@ -64,6 +64,27 @@ pipeline { } } // stages post { + success { script { + withCredentials([ + string( + credentialsId: 'discord-waku-deployments-webhook', + variable: 'DISCORD_WEBHOOK' + ), + ]) { + discordSend( + title: "${env.JOB_NAME}#${env.BUILD_NUMBER}", + description: """ + Nim-Waku deployment successful! + Image: [`${IMAGE_NAME}:${IMAGE_TAG}`](https://hub.docker.com/r/${IMAGE_NAME}/tags?page=1&name=${IMAGE_TAG}) + Branch: [`${GIT_BRANCH.minus("origin/")}`](https://github.com/status-im/nwaku/commits/${GIT_BRANCH.minus("origin/")}) + Commit: [`${GIT_COMMIT.take(8)}`](https://github.com/status-im/nwaku/commit/${GIT_COMMIT.take(8)}) + """, + link: env.BUILD_URL, + result: currentBuild.currentResult, + webhookURL: env.DISCORD_WEBHOOK + ) + } + } } always { sh 'docker image prune -f' } } // post } // pipeline