Skip to content

Commit

Permalink
ci: use releaseManagerNotification
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Mar 30, 2022
1 parent 50cc018 commit 8c2d88b
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .ci/packaging.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pipeline {
notifyStatus(analyse: true,
file: "${BASE_DIR}/${env.DRA_OUTPUT}",
subject: "[${env.REPO}@${env.BRANCH_NAME}] DRA failed.",
body: 'Contact the Release Platform team [#platform-release].')
body: 'Contact the Release Platform team [#platform-release]')
}
}
}
Expand Down Expand Up @@ -423,10 +423,16 @@ def withBeatsEnv(Closure body) {
}

def notifyStatus(def args = [:]) {
releaseNotification(slackChannel: "${env.SLACK_CHANNEL}",
slackColor: args.slackStatus,
slackCredentialsId: 'jenkins-slack-integration-token',
to: "${env.NOTIFY_TO}",
subject: args.subject,
body: args.body)
def releaseManagerFile = args.get('file', '')
def analyse = args.get('analyse', false)
def subject = args.get('subject', '')
def body = args.get('body', '')
releaseManagerNotification(file: releaseManagerFile,
analyse: analyse,
slackChannel: "${env.SLACK_CHANNEL}",
slackColor: 'danger',
slackCredentialsId: 'jenkins-slack-integration-token',
to: "${env.NOTIFY_TO}",
subject: subject,
body: "Build: (<${env.RUN_DISPLAY_URL}|here>).\n ${body}")
}

0 comments on commit 8c2d88b

Please sign in to comment.