Update slackSend for ruby-2.6 builds

Closes: CCI-338
flag=none

Test Plan:
- Tested by faking out the logic to detect merge-patchsets,
otherwise this isn't really testable until we have future failures once
this is merged

Change-Id: I81a95dca425fc25e85a8a7425e864a0740cf1f49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234747
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
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: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
This commit is contained in:
Derek Bender 2020-04-21 09:14:39 -05:00
parent 1e6d59cb6a
commit cdd01025a4
1 changed files with 5 additions and 1 deletions

6
Jenkinsfile vendored
View File

@ -76,6 +76,10 @@ def isPatchsetPublishable() {
env.PATCHSET_TAG == env.PUBLISHABLE_TAG
}
def isPatchsetSlackableOnFailure() {
env.SLACK_MESSAGE_ON_FAILURE == 'true' && env.GERRIT_EVENT_TYPE == 'change-merged'
}
// WARNING! total hack, being removed after covid...
def isCovid() {
env.GERRIT_BRANCH == 'covid'
@ -395,7 +399,7 @@ pipeline {
post {
failure {
script {
if (isPatchsetPublishable() && env.GERRIT_EVENT_TYPE == 'change-merged') {
if (isPatchsetSlackableOnFailure()) {
def branchSegment = env.GERRIT_BRANCH ? "[$env.GERRIT_BRANCH]" : ''
def authorSegment = env.GERRIT_EVENT_ACCOUNT_NAME ? "Patchset by ${env.GERRIT_EVENT_ACCOUNT_NAME}. " : ''
slackSend(