-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
Component/s: docker-commons-plugin
-
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.
Â