I have a step in my Jenkinsfile that runs using a Dockerfile
agent. When jenkins creates the docker image it gives it a random long tag and I'd like to replace that with my own tag. I tried passing the tag using additionalBuildArgs
but that gives the docker image an additional tag.
agent {
dockerfile {
additionalBuildArgs '-t my-image:latest'
}
}
Is there a way to stop Jenkins from passing a tag?