-
Bug
-
Resolution: Fixed
-
Minor
-
None
After upgrade docker commons plugin 1.17 -> 1.21 we got this error:
ERROR: Tag must follow the pattern '^:[a-zA-Z0-9_]([a-zA-Z0-9_.-]){0,127}'
Found few similar issues, but no resolve for our case. We use private docker registry with custom port example.com:6050. Probably, additional ":" cause error. Example, to reproduce:
def DOCKER_REPO = 'example.com:6050' def DOCKER_REPO_APP_DEV = "${DOCKER_REPO}/project/app" def SOME_ARG = "test" ... stage('Build and Push Images') { environment { GIT_COMMIT = "`git rev-parse HEAD`" } steps { script { docker.withRegistry("https://$DOCKER_REPO", 'RegistrySecret') { def image_app = docker.build("${DOCKER_REPO_APP_DEV}:${GIT_COMMIT}", "--build-arg SOME_ARG=$SOME_ARG -f Dockerfile .") image_app.push() image_app.push("latest") } } } } ...
On 1.17 version this example works, but on 1.21 - don't.
Regards.