From b9a84af5c28136e12ea6ec9e7e5a60419cff8e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 12 Oct 2022 09:29:35 +0200 Subject: [PATCH] ci: add username and email to build notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Makes it easier to identify who to talk to about a deployment. This depends on the following plugin being installed: https://plugins.jenkins.io/build-user-vars-plugin/ Signed-off-by: Jakub SokoĊ‚owski --- ci/Jenkinsfile.release | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/Jenkinsfile.release b/ci/Jenkinsfile.release index 3c1478690..2bc2c7a5e 100644 --- a/ci/Jenkinsfile.release +++ b/ci/Jenkinsfile.release @@ -77,6 +77,9 @@ pipeline { commit: GIT_COMMIT.take(8), prev: (env.GIT_PREVIOUS_SUCCESSFUL_COMMIT ?: env.GIT_PREVIOUS_COMMIT ?: 'master').take(8), ] + wrap([$class: 'BuildUser']) { + BUILD_USER_ID = env.BUILD_USER_ID + } discordSend( title: "${env.JOB_NAME}#${env.BUILD_NUMBER}", description: """ @@ -85,6 +88,7 @@ pipeline { Branch: [`${repo.branch}`](${repo.url}/commits/${repo.branch}) Commit: [`${repo.commit}`](${repo.url}/commit/${repo.commit}) Diff: [`${repo.prev}...${repo.commit}`](${repo.url}/compare/${repo.prev}...${repo.commit}) + By: [`${BUILD_USER_ID}`](${repo.url}/commits?author=${BUILD_USER_ID}) """, link: env.BUILD_URL, result: currentBuild.currentResult,