This commit is contained in:
Jack-Leung 2020-03-16 00:32:32 -04:00 committed by GitHub
parent 3b37c58dfb
commit 32bee7d881
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

36
Jenkinsfile vendored
View file

@ -1,35 +1,23 @@
pipeline { pipeline {
agent any agent any
stages { stages {
try { script {
try {
notifySlack('STARTED') notifySlack('STARTED')
stage('Prepare code') { stage('Build') {
echo 'do checkout stuff' echo 'build'
} }
stage('Testing') { } catch (e) {
echo 'Testing' // If there was an exception thrown, the build failed
echo 'Testing - publish coverage results' currentBuild.result = "FAILED"
throw e
} finally {
// Success or failure, always send notifications
notifySlack(currentBuild.result)
} }
}
stage('Staging') {
echo 'Deploy Stage'
}
stage('Deploy') {
echo 'Deploy - Backend'
echo 'Deploy - Frontend'
}
} 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)
}
} }
} }