I've defined input Jenkins variable BRANCH
as below
I tried to access it in 'Pipeline script from SCM'
but no luck. BRANCH
value never evaluate?
I used below syntaxes.
${BRANCH}
${params.BRANCH}
${env.BRANCH}
BRANCH
env.BRANCH
None of this evaluate to actual value, how can I get value that user specified?
hudson.plugins.git.GitException: Command
"git fetch --tags --force --progress --prune -- origin
refs/heads/env.BRANCH:refs/remotes/origin/env.BRANCH"
returned status code 128:
CodePudding user response:
Okay, I found that I've checked Lightweight checkout
option and that's why it wasn't resolving this input param values.
I've uncheck Lightweight checkout
option and ${BRANCH}
is resolving it's value correctly