From e01f7bf1682703d6774b3b8c234fc0d8f6ee2526 Mon Sep 17 00:00:00 2001 From: khalilalturk <46938248+khalilalturk@users.noreply.github.com> Date: Sun, 15 Mar 2020 16:47:50 -0400 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c625ae1f6..88295c136 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,11 +19,22 @@ pipeline { } stage('Deploy') { - - steps { - sh 'mvn deploy' - } - } + when { + branch 'master' + } + steps { + sh 'mvn deploy'} + } + } + stage('Slack Notification') { + steps { + slackSend baseUrl: 'https://hooks.slack.com/services/', + channel: '#jenkins', + message: 'Build Status', + tokenCredentialId: 'slack', + teamDomain: 'soen345' + } + } } }