mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:05:50 +00:00
Update Jenkinsfile
This commit is contained in:
parent
2593ed00e5
commit
b6c037e803
1 changed files with 35 additions and 33 deletions
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
|
@ -1,7 +1,8 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
node {
|
||||||
try {
|
try {
|
||||||
notifyBuild('STARTED')
|
notifySlack('STARTED')
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
|
@ -34,11 +35,12 @@ pipeline {
|
||||||
throw e
|
throw e
|
||||||
} finally {
|
} finally {
|
||||||
// Success or failure, always send notifications
|
// 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
|
// build status of null means successful
|
||||||
buildStatus = buildStatus ?: 'SUCCESSFUL'
|
buildStatus = buildStatus ?: 'SUCCESSFUL'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue