From 32bee7d881aacf276caa9eb4d1eaab985667b613 Mon Sep 17 00:00:00 2001 From: Jack-Leung <38930117+Jack-Leung@users.noreply.github.com> Date: Mon, 16 Mar 2020 00:32:32 -0400 Subject: [PATCH] test 6 --- Jenkinsfile | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 56ed3a723..e9de95c04 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,35 +1,23 @@ pipeline { agent any stages { - try { + script { + try { notifySlack('STARTED') - stage('Prepare code') { - echo 'do checkout stuff' + stage('Build') { + echo 'build' } - stage('Testing') { - echo 'Testing' - echo 'Testing - publish coverage results' + } 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) } - - 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) - } + } } }