testing slack notif

This commit is contained in:
Jack-Leung 2020-03-15 23:43:53 -04:00 committed by GitHub
parent 08e6477f96
commit a81b521880
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

31
Jenkinsfile vendored
View file

@ -1,23 +1,16 @@
node {
try {
notifyBuild('STARTED')
notifySlack('STARTED')
stage('Prepare code') {
echo 'do checkout stuff'
}
stage('Testing') {
echo 'Testing'
echo 'Testing - publish coverage results'
}
stage('Staging') {
echo 'Deploy Stage'
}
stage('Deploy') {
echo 'Deploy - Backend'
echo 'Deploy - Frontend'
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Build'
}
}
}
}
} catch (e) {
@ -26,11 +19,11 @@ node {
throw e
} finally {
// Success or failure, always send notifications
notifyBuild(currentBuild.result)
notifySlack(currentBuild.result)
}
}
def notifyBuild(String buildStatus = 'STARTED') {
def notifySlack(String buildStatus = 'STARTED') {
// build status of null means successful
buildStatus = buildStatus ?: 'SUCCESSFUL'