I cannot seem to extract $GIT_COMMIT and $BRANCH_NAME from a Jenkins Workflow Checkout step.
I would like to be able to send this information through to my Gradle sc
If you want to access the BRANCH_NAME from Jenkins environment variable as a shell script, use the below snippet.
BRANCH_NAME
sh 'echo Branch Name: $BRANCH_NAME'
The response should be as below:
Branch Name: the_checkedout_branch