testing 2

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

16
Jenkinsfile vendored
View file

@ -1,14 +1,13 @@
node {
try {
notifySlack('STARTED')
pipeline { pipeline {
agent any agent any
node {
try {
notifyBuild('STARTED')
stages { stages {
stage('Build') { stage('Build') {
steps { steps {
echo 'Build' echo 'build'
}
} }
} }
} }
@ -19,11 +18,12 @@ node {
throw e throw e
} finally { } finally {
// Success or failure, always send notifications // Success or failure, always send notifications
notifySlack(currentBuild.result) notifyBuild(currentBuild.result)
}
} }
} }
def notifySlack(String buildStatus = 'STARTED') { def notifyBuild(String buildStatus = 'STARTED') {
// build status of null means successful // build status of null means successful
buildStatus = buildStatus ?: 'SUCCESSFUL' buildStatus = buildStatus ?: 'SUCCESSFUL'