From 4c158f1bb62c66f02c601b3121aceaedf2807c4a Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sun, 26 Nov 2023 22:52:19 +0800 Subject: [PATCH] Test triggering of new webhook for Jenkins Multibranch setup --- Jenkinsfile | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6addbe0..0767031 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,21 +11,23 @@ pipeline { stages { stage('Download source code from Git') { steps { - switch(GIT_BRANCH) { - case "vapor/production": - git( - url: 'https://gitlab.com/CIEFWorldwideSdnBhd/vapor-laravel-explore.git', - credentialsId: 'gitlab-jenkins-localhost', - branch: 'vapor/production' - ) - break - case "vapor/staging": - git( - url: 'https://gitlab.com/CIEFWorldwideSdnBhd/vapor-laravel-explore.git', - credentialsId: 'gitlab-jenkins-localhost', - branch: 'vapor/staging' - ) - break + script{ + switch(GIT_BRANCH) { + case "vapor/production": + git( + url: 'https://gitlab.com/CIEFWorldwideSdnBhd/vapor-laravel-explore.git', + credentialsId: 'gitlab-jenkins-localhost', + branch: 'vapor/production' + ) + break + case "vapor/staging": + git( + url: 'https://gitlab.com/CIEFWorldwideSdnBhd/vapor-laravel-explore.git', + credentialsId: 'gitlab-jenkins-localhost', + branch: 'vapor/staging' + ) + break + } } } }