common-custom-user-data-gradle-plugin
common-custom-user-data-gradle-plugin copied to clipboard
add BRANCH_NAME even if git is missing
We are using the k8s plugin in Jenkins which runs gradle in a docker container that doesn't have git installed. This means that the BRANCH name is no longer added as a tag. It would be good if this was fixed so that even if git is not installed the BRANCH_NAME env variable is still added as a tag.
This is the default behavior. See the code here
However in your specific case, since you are running the build inside the docker container, can you make sure that these environment variables are also available inside your docker container?
Hi Nelson, BRANCH_NAME is available inside the container but it doesn't get added as a tag, this is because the code you pointed to only runs if git is available.
Ah, thanks for finding that. We'll look in to this.