add branch and author to slackSend
Change-Id: I2a816e3f0334e3550ec67b8e579b384876af5f70 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230445 Reviewed-by: Jacob Powell <spowell@instructure.com> Reviewed-by: James Butters <jbutters@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Derek Bender <djbender@instructure.com> Product-Review: Derek Bender <djbender@instructure.com>
This commit is contained in:
parent
145874e18f
commit
f49eb28966
|
@ -110,7 +110,7 @@ pipeline {
|
|||
def credentials = load ('build/new-jenkins/groovy/credentials.groovy')
|
||||
|
||||
// WARNING! total hack, being removed after covid...
|
||||
// if this build is triggered from a plugin that is from the
|
||||
// if this build is triggered from a plugin that is from the
|
||||
// covid branch, we need to checkout the covid branch for canvas-lms
|
||||
if (isCovid() && env.GERRIT_PROJECT != 'canvas-lms') {
|
||||
echo 'checking out canvas-lms covid branch'
|
||||
|
@ -380,10 +380,12 @@ pipeline {
|
|||
failure {
|
||||
script {
|
||||
if (isPatchsetPublishable() && env.GERRIT_EVENT_TYPE == 'change-merged') {
|
||||
def branchSegment = env.GERRIT_BRANCH ? "[$env.GERRIT_BRANCH]" : ''
|
||||
def authorSegment = env.GERRIT_EVENT_ACCOUNT_NAME ? "Patchset by ${env.GERRIT_EVENT_ACCOUNT_NAME}. " : ''
|
||||
slackSend(
|
||||
channel: '#canvas_builds',
|
||||
color: 'danger',
|
||||
message: "${env.JOB_NAME} failed on merge (<${env.BUILD_URL}|${env.BUILD_NUMBER}>)"
|
||||
message: "${branchSegment}${env.JOB_NAME} failed on merge. ${authorSegment}(<${env.BUILD_URL}|${env.BUILD_NUMBER}>)"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue