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

32
Jenkinsfile vendored
View file

@ -1,29 +1,29 @@
node {
try {
notifySlack('STARTED')
pipeline {
agent any
node {
try {
notifyBuild('STARTED')
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Build'
echo 'build'
}
}
}
} catch (e) {
// If there was an exception thrown, the build failed
currentBuild.result = "FAILED"
throw e
} finally {
// Success or failure, always send notifications
notifyBuild(currentBuild.result)
}
} catch (e) {
// If there was an exception thrown, the build failed
currentBuild.result = "FAILED"
throw e
} finally {
// Success or failure, always send notifications
notifySlack(currentBuild.result)
}
}
}
def notifySlack(String buildStatus = 'STARTED') {
def notifyBuild(String buildStatus = 'STARTED') {
// build status of null means successful
buildStatus = buildStatus ?: 'SUCCESSFUL'