mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 14:55:51 +00:00
testing 2
This commit is contained in:
parent
a81b521880
commit
cfb812d8f1
1 changed files with 16 additions and 16 deletions
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in a new issue