From e11e86541b9264d0eb075d4e5b6271c95a61b598 Mon Sep 17 00:00:00 2001 From: Arnaud Dieumegard Date: Tue, 12 Jul 2022 10:00:10 +0200 Subject: [PATCH] #36 Customize build message --- vars/github.groovy | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vars/github.groovy b/vars/github.groovy index 016b3cb..ee53cd0 100644 --- a/vars/github.groovy +++ b/vars/github.groovy @@ -37,8 +37,12 @@ def buildStartedComment() { } def buildSuccessfullComment() { + buildSuccessfullComment("core/products") +} + +def buildSuccessfullComment(path) { def buildDir = "${BUILD_KEY}-${BRANCH_NAME}-${BUILD_ID}".replaceAll('/','-') - def message = ":thumbsup: Build [${buildDir}](${BUILD_URL}) is successfull! The product is available [here](http://download.eclipse.org/capella/core/products/nightly/${buildDir})." + def message = ":thumbsup: Build [${buildDir}](${BUILD_URL}) is successfull! The product is available [here](http://download.eclipse.org/capella/${path}/nightly/${buildDir})." pullRequestComment(message) } @@ -51,8 +55,12 @@ def buildFailedComment() { } def buildUnstableComment() { + buildUnstableComment("core/products") +} + +def buildUnstableComment(path) { def buildDir = "${BUILD_KEY}-${BRANCH_NAME}-${BUILD_ID}".replaceAll('/','-') - def message = ":worried: Build [${buildDir}](${BUILD_URL}) is unstable! The product is available [here](http://download.eclipse.org/capella/core/products/nightly/${buildDir})." + def message = ":worried: Build [${buildDir}](${BUILD_URL}) is unstable! The product is available [here](http://download.eclipse.org/capella/${path}/nightly/${buildDir})." pullRequestComment(message) }