mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:05:50 +00:00
testing slack notif
This commit is contained in:
parent
08e6477f96
commit
a81b521880
1 changed files with 12 additions and 19 deletions
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
@ -1,23 +1,16 @@
|
||||||
node {
|
node {
|
||||||
try {
|
try {
|
||||||
notifyBuild('STARTED')
|
notifySlack('STARTED')
|
||||||
|
|
||||||
stage('Prepare code') {
|
pipeline {
|
||||||
echo 'do checkout stuff'
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
echo 'Build'
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Testing') {
|
|
||||||
echo 'Testing'
|
|
||||||
echo 'Testing - publish coverage results'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Staging') {
|
|
||||||
echo 'Deploy Stage'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy') {
|
|
||||||
echo 'Deploy - Backend'
|
|
||||||
echo 'Deploy - Frontend'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -26,11 +19,11 @@ node {
|
||||||
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