07-23-2023, 10:58 AM
I have stage in my jenkinsfile, that executes a bat command:
stage ('build'){
bat '%cd%\\MySimpleProject\\bin\\Execute.bat "${env.BRANCH_NAME}"'
}
My batch command requires a parameter that is the current branch in svn.
When I use this:
echo "SVN_BRANCH_NAME is ${env.BRANCH_NAME}"
It would give the value of BRANCH_NAME but if I pass it as param to my batch file, it literally pass ${env.BRANCH_NAME} not the value.
Is their a way to do this?
stage ('build'){
bat '%cd%\\MySimpleProject\\bin\\Execute.bat "${env.BRANCH_NAME}"'
}
My batch command requires a parameter that is the current branch in svn.
When I use this:
echo "SVN_BRANCH_NAME is ${env.BRANCH_NAME}"
It would give the value of BRANCH_NAME but if I pass it as param to my batch file, it literally pass ${env.BRANCH_NAME} not the value.
Is their a way to do this?