From fe6c6f0f52dbbd183e6977dc35ce6c3fd5fba1ca Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Thu, 6 Oct 2022 13:26:19 +0530 Subject: [PATCH] added BRANCH parameter --- jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index ebf10e08e..6e8749303 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -1,10 +1,11 @@ pipeline { agent { label 'JAVA-11' } triggers { pollSCM( '* * * * *' ) } + parameters { choice(name: 'BRANCH', choices: ['main', 'master', 'three'], description: 'Choose the branch') } stages { stage('clone') { steps { - git branch: 'main', url: 'https://github.com/GUDAPATIVENKATESH/spring-petclinic.git' + git branch: '${params.BRANCH}', url: 'https://github.com/GUDAPATIVENKATESH/spring-petclinic.git' } } stage('Build') {