Unverified Commit 2b470b78 authored by Keshav Prasad's avatar Keshav Prasad Committed by GitHub
Browse files

feat: DO-701 Branch override message display

Showing with 7 additions and 1 deletion
+7 -1
......@@ -20,8 +20,14 @@ def call(Map pipelineParams) {
error 'Please resolve errors and rerun..'
}
def checkDir = new File('../private')
if(params.private_branch != null && params.private_branch != "")
if(params.private_branch != null && params.private_branch != ""){
env.private_repo_branch = params.private_branch
println(ANSI_BOLD + ANSI_YELLOW + 'Info: Branch override is enabled' + ANSI_NORMAL)
}
else
println(ANSI_BOLD + ANSI_YELLOW + 'Info: Branch override is disabled' + ANSI_NORMAL)
if(!checkDir.exists())
checkout scm: [$class: 'GitSCM', branches: [[name: private_repo_branch]], extensions: [[$class: 'GitLFSPull'], [$class: 'CloneOption', depth: 1, noTags: true, reference: '', shallow: true]], userRemoteConfigs: [[credentialsId: private_repo_credentials, url: private_repo_url]]]
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment