Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67572

Error on docker image name: Name must follow the pattern

    • 1.19

      Since updating my jenkins plugins to latest versions today, i get the folloging error

      ERROR: Name must follow the pattern '^[a-zA-Z0-9]+((\.|_|__|-+)[a-zA-Z0-9]+)*$'
      	at hudson.util.FormValidation._errorWithMarkup(FormValidation.java:266)
      	at hudson.util.FormValidation.errorWithMarkup(FormValidation.java:252)
      	at hudson.util.FormValidation.error(FormValidation.java:143)
      	at hudson.util.FormValidation.error(FormValidation.java:168)
      	at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateName(ImageNameValidator.java:209)
      	at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateUserAndRepo(ImageNameValidator.java:105)
      	at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.checkUserAndRepo(ImageNameValidator.java:126)
      	at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator$checkUserAndRepo.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      	at org.jenkinsci.plugins.docker.workflow.Docker.check(Docker.groovy:97)
      

      Part of pipeline.

                          agent {
                              docker {
                                  label 'docker && linux'
                                  image 'ghcr.visualon.de/visualon/builder:1.0.21@sha256:56930391cf0e1be83108422bbef43001650cfb75f64b3429928f0c5986fdb750'
                              }
                          }
                          steps {
                              sh 'yarn install --frozen-lockfile'
                          }
      

      It seems that digest pinning is no longer allowd

          [JENKINS-67572] Error on docker image name: Name must follow the pattern

          Probably due to latest credentials plugin changes? https://plugins.jenkins.io/credentials/#releases

          Updated from 1055.v1346ba467ba1 to 1074.v60e6c29b_b_44b_ today

          Michael Kriese added a comment - Probably due to latest credentials plugin changes? https://plugins.jenkins.io/credentials/#releases Updated from 1055.v1346ba467ba1 to 1074.v60e6c29b_b_44b_ today

          Nope, isn't it. Will investigate further

          Michael Kriese added a comment - Nope, isn't it. Will investigate further

          logs of updates:

          2022-01-12 17:13:39.979+0000 [id=15509]	INFO	hudson.PluginManager#install: Starting installation of a batch of 20 plugins plus their dependencies
          2022-01-12 17:13:39.986+0000 [id=15509]	INFO	hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of jackson2-api for plugin kubernetes
          2022-01-12 17:13:39.986+0000 [id=15509]	INFO	hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of kubernetes-client-api for plugin kubernetes
          2022-01-12 17:13:39.986+0000 [id=15509]	INFO	hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of javax-mail-api for plugin mailer
          2022-01-12 17:13:39.986+0000 [id=15509]	INFO	hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of javax-activation-api for plugin javax-mail-api
          2022-01-12 17:13:40.220+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of docker-commons on behalf of admin
          2022-01-12 17:13:41.635+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading docker-commons
          2022-01-12 17:13:41.891+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of jackson2-api on behalf of admin
          2022-01-12 17:13:42.809+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading jackson2-api
          2022-01-12 17:13:43.880+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of kubernetes-client-api on behalf of admin
          2022-01-12 17:13:45.394+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading kubernetes-client-api
          2022-01-12 17:13:45.445+0000 [id=54145]	INFO	hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started DockerContainerWatchdog Asynchronous Periodic Work
          2022-01-12 17:13:45.445+0000 [id=54145]	INFO	c.n.j.p.d.DockerContainerWatchdog#execute: Docker Container Watchdog has been triggered
          2022-01-12 17:13:45.446+0000 [id=54145]	INFO	c.n.j.p.d.DockerContainerWatchdog$Statistics#writeStatisticsToLog: Watchdog Statistics: Number of overall executions: 949, Executions with processing timeout: 0, Containers removed gracefully: 0, Containers removed with force: 0, Containers removal failed: 0, Nodes removed successfully: 0, Nodes removal failed: 0, Container removal average duration (gracefully): 0 ms, Container removal average duration (force): 0 ms, Average overall runtime of watchdog: 0 ms, Average runtime of container retrieval: 0 ms
          2022-01-12 17:13:45.446+0000 [id=54145]	INFO	c.n.j.p.d.DockerContainerWatchdog#loadNodeMap: We currently have 12 nodes assigned to this Jenkins instance, which we will check
          2022-01-12 17:13:45.446+0000 [id=54145]	INFO	c.n.j.p.d.DockerContainerWatchdog#execute: Docker Container Watchdog check has been completed
          2022-01-12 17:13:45.446+0000 [id=54145]	INFO	hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished DockerContainerWatchdog Asynchronous Periodic Work. 1 ms
          2022-01-12 17:13:47.622+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of kubernetes on behalf of admin
          2022-01-12 17:13:48.984+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading kubernetes
          2022-01-12 17:13:49.605+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of javax-activation-api on behalf of admin
          2022-01-12 17:13:50.550+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading javax-activation-api
          2022-01-12 17:13:50.611+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of javax-mail-api on behalf of admin
          2022-01-12 17:13:51.547+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading javax-mail-api
          2022-01-12 17:13:51.747+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of mailer on behalf of admin
          2022-01-12 17:13:52.699+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading mailer
          2022-01-12 17:13:52.804+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of workflow-support on behalf of admin
          2022-01-12 17:13:53.756+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading workflow-support
          2022-01-12 17:13:53.902+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of metrics on behalf of admin
          2022-01-12 17:13:54.812+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading metrics
          2022-01-12 17:13:54.950+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of ssh-agent on behalf of admin
          2022-01-12 17:13:56.063+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading ssh-agent
          2022-01-12 17:13:56.199+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of cloudbees-bitbucket-branch-source on behalf of admin
          2022-01-12 17:13:57.138+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading cloudbees-bitbucket-branch-source
          2022-01-12 17:13:57.319+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of timestamper on behalf of admin
          2022-01-12 17:13:58.277+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading timestamper
          2022-01-12 17:13:58.515+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of workflow-multibranch on behalf of admin
          2022-01-12 17:13:59.447+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading workflow-multibranch
          2022-01-12 17:13:59.526+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of credentials on behalf of admin
          2022-01-12 17:14:00.551+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading credentials
          2022-01-12 17:14:00.777+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of plugin-util-api on behalf of admin
          2022-01-12 17:14:01.727+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading plugin-util-api
          2022-01-12 17:14:01.961+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of docker-workflow on behalf of admin
          2022-01-12 17:14:02.914+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading docker-workflow
          2022-01-12 17:14:03.078+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of credentials-binding on behalf of admin
          2022-01-12 17:14:03.997+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading credentials-binding
          2022-01-12 17:14:04.104+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of jackson2-api on behalf of admin
          2022-01-12 17:14:04.104+0000 [id=54134]	INFO	h.m.UpdateCenter$InstallationJob#_run: Skipping duplicate install of: Jackson 2 API@2.13.1-246.va8a9f3eaf46a
          2022-01-12 17:14:04.104+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Installation successful: jackson2-api
          2022-01-12 17:14:04.104+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of scm-api on behalf of admin
          2022-01-12 17:14:05.072+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading scm-api
          2022-01-12 17:14:05.306+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of kubernetes-client-api on behalf of admin
          2022-01-12 17:14:05.306+0000 [id=54134]	INFO	h.m.UpdateCenter$InstallationJob#_run: Skipping duplicate install of: Kubernetes Client API@5.11.2-182.v0f1cf4c5904e
          2022-01-12 17:14:05.306+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Installation successful: kubernetes-client-api
          2022-01-12 17:14:05.306+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of script-security on behalf of admin
          2022-01-12 17:14:06.246+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading script-security
          2022-01-12 17:14:06.546+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of antisamy-markup-formatter on behalf of admin
          2022-01-12 17:14:07.517+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading antisamy-markup-formatter
          2022-01-12 17:14:07.655+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of matrix-project on behalf of admin
          2022-01-12 17:14:08.570+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading matrix-project
          2022-01-12 17:14:08.728+0000 [id=54134]	INFO	h.model.UpdateCenter$DownloadJob#run: Starting the installation of warnings-ng on behalf of admin
          2022-01-12 17:14:09.718+0000 [id=54134]	INFO	h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading warnings-ng
          2022-01-12 17:14:23.284+0000 [id=15568]	INFO	hudson.model.UpdateCenter#doSafeRestart: Scheduling Jenkins reboot
          

          Michael Kriese added a comment - logs of updates: 2022-01-12 17:13:39.979+0000 [id=15509] INFO hudson.PluginManager#install: Starting installation of a batch of 20 plugins plus their dependencies 2022-01-12 17:13:39.986+0000 [id=15509] INFO hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of jackson2-api for plugin kubernetes 2022-01-12 17:13:39.986+0000 [id=15509] INFO hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of kubernetes-client-api for plugin kubernetes 2022-01-12 17:13:39.986+0000 [id=15509] INFO hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of javax-mail-api for plugin mailer 2022-01-12 17:13:39.986+0000 [id=15509] INFO hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of javax-activation-api for plugin javax-mail-api 2022-01-12 17:13:40.220+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of docker-commons on behalf of admin 2022-01-12 17:13:41.635+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading docker-commons 2022-01-12 17:13:41.891+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of jackson2-api on behalf of admin 2022-01-12 17:13:42.809+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading jackson2-api 2022-01-12 17:13:43.880+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of kubernetes-client-api on behalf of admin 2022-01-12 17:13:45.394+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading kubernetes-client-api 2022-01-12 17:13:45.445+0000 [id=54145] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started DockerContainerWatchdog Asynchronous Periodic Work 2022-01-12 17:13:45.445+0000 [id=54145] INFO c.n.j.p.d.DockerContainerWatchdog#execute: Docker Container Watchdog has been triggered 2022-01-12 17:13:45.446+0000 [id=54145] INFO c.n.j.p.d.DockerContainerWatchdog$Statistics#writeStatisticsToLog: Watchdog Statistics: Number of overall executions: 949, Executions with processing timeout: 0, Containers removed gracefully: 0, Containers removed with force: 0, Containers removal failed: 0, Nodes removed successfully: 0, Nodes removal failed: 0, Container removal average duration (gracefully): 0 ms, Container removal average duration (force): 0 ms, Average overall runtime of watchdog: 0 ms, Average runtime of container retrieval: 0 ms 2022-01-12 17:13:45.446+0000 [id=54145] INFO c.n.j.p.d.DockerContainerWatchdog#loadNodeMap: We currently have 12 nodes assigned to this Jenkins instance, which we will check 2022-01-12 17:13:45.446+0000 [id=54145] INFO c.n.j.p.d.DockerContainerWatchdog#execute: Docker Container Watchdog check has been completed 2022-01-12 17:13:45.446+0000 [id=54145] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished DockerContainerWatchdog Asynchronous Periodic Work. 1 ms 2022-01-12 17:13:47.622+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of kubernetes on behalf of admin 2022-01-12 17:13:48.984+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading kubernetes 2022-01-12 17:13:49.605+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of javax-activation-api on behalf of admin 2022-01-12 17:13:50.550+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading javax-activation-api 2022-01-12 17:13:50.611+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of javax-mail-api on behalf of admin 2022-01-12 17:13:51.547+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading javax-mail-api 2022-01-12 17:13:51.747+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of mailer on behalf of admin 2022-01-12 17:13:52.699+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading mailer 2022-01-12 17:13:52.804+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of workflow-support on behalf of admin 2022-01-12 17:13:53.756+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading workflow-support 2022-01-12 17:13:53.902+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of metrics on behalf of admin 2022-01-12 17:13:54.812+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading metrics 2022-01-12 17:13:54.950+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of ssh-agent on behalf of admin 2022-01-12 17:13:56.063+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading ssh-agent 2022-01-12 17:13:56.199+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of cloudbees-bitbucket-branch-source on behalf of admin 2022-01-12 17:13:57.138+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading cloudbees-bitbucket-branch-source 2022-01-12 17:13:57.319+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of timestamper on behalf of admin 2022-01-12 17:13:58.277+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading timestamper 2022-01-12 17:13:58.515+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of workflow-multibranch on behalf of admin 2022-01-12 17:13:59.447+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading workflow-multibranch 2022-01-12 17:13:59.526+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of credentials on behalf of admin 2022-01-12 17:14:00.551+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading credentials 2022-01-12 17:14:00.777+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of plugin-util-api on behalf of admin 2022-01-12 17:14:01.727+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading plugin-util-api 2022-01-12 17:14:01.961+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of docker-workflow on behalf of admin 2022-01-12 17:14:02.914+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading docker-workflow 2022-01-12 17:14:03.078+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of credentials-binding on behalf of admin 2022-01-12 17:14:03.997+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading credentials-binding 2022-01-12 17:14:04.104+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of jackson2-api on behalf of admin 2022-01-12 17:14:04.104+0000 [id=54134] INFO h.m.UpdateCenter$InstallationJob#_run: Skipping duplicate install of: Jackson 2 API@2.13.1-246.va8a9f3eaf46a 2022-01-12 17:14:04.104+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Installation successful: jackson2-api 2022-01-12 17:14:04.104+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of scm-api on behalf of admin 2022-01-12 17:14:05.072+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading scm-api 2022-01-12 17:14:05.306+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of kubernetes-client-api on behalf of admin 2022-01-12 17:14:05.306+0000 [id=54134] INFO h.m.UpdateCenter$InstallationJob#_run: Skipping duplicate install of: Kubernetes Client API@5.11.2-182.v0f1cf4c5904e 2022-01-12 17:14:05.306+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Installation successful: kubernetes-client-api 2022-01-12 17:14:05.306+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of script-security on behalf of admin 2022-01-12 17:14:06.246+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading script-security 2022-01-12 17:14:06.546+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of antisamy-markup-formatter on behalf of admin 2022-01-12 17:14:07.517+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading antisamy-markup-formatter 2022-01-12 17:14:07.655+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of matrix-project on behalf of admin 2022-01-12 17:14:08.570+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading matrix-project 2022-01-12 17:14:08.728+0000 [id=54134] INFO h.model.UpdateCenter$DownloadJob#run: Starting the installation of warnings-ng on behalf of admin 2022-01-12 17:14:09.718+0000 [id=54134] INFO h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading warnings-ng 2022-01-12 17:14:23.284+0000 [id=15568] INFO hudson.model.UpdateCenter#doSafeRestart: Scheduling Jenkins reboot

          Michael Kriese added a comment - looks like this commit is the source: https://github.com/jenkinsci/docker-commons-plugin/commit/c069b79c31c5aa80a01b0c462f0dc6b41751f059

          Michael Kriese added a comment - started a pr to fix https://github.com/jenkinsci/docker-commons-plugin/pull/93

          Jeremy Norris added a comment -

          Is there an ETA to when this will be resolved?

          Jeremy Norris added a comment - Is there an ETA to when this will be resolved?

          Tiberiu Zuld added a comment - - edited

          Hello,
          I updated to latest version 1.18 from 1.17 12 hours ago, and now our builds fail with pattern match error like in description.

          We use in our builds like this: 

           docker.build('registry.company.domain/product/app:${APP_VERSION}', '--network=host --build-arg APP_VERSION=${APP_VERSION} --build-arg app=<my-app> .')
          

          The workaround was to change to:

          docker.build('registry.company.domain/product/app:' + APP_VERSION, '--network=host --build-arg APP_VERSION=${APP_VERSION} --build-arg app=<my-app> .')
          

          Tiberiu Zuld added a comment - - edited Hello, I updated to latest version 1.18 from 1.17 12 hours ago, and now our builds fail with pattern match error like in description. We use in our builds like this:  docker.build( 'registry.company.domain/product/app:${APP_VERSION}' , '--network=host --build-arg APP_VERSION=${APP_VERSION} --build-arg app=<my-app> .' ) The workaround was to change to: docker.build( 'registry.company.domain/product/app:' + APP_VERSION, '--network=host --build-arg APP_VERSION=${APP_VERSION} --build-arg app=<my-app> .' )

          I can confirm we have the same issue when using image name like "xxx.dkr.ecr.eu-west-1.amazonaws.com/aaa/bbb@sha256:zzz". The issue is resolved if both Docker Commons and Docker pipeline plugins are reverted to previous versions (1.17 and 1.26 respectively).

          This seems to be caused by the recently added validation of the image name in response to SECURITY-1878 / CVE-2022-20617 (https://www.jenkins.io/security/advisory/2022-01-12/#SECURITY-1878) - obviously the validation is not robust enough and does not take into account such complex image names (which are still valid docker image names).

          Paulina Budzon added a comment - I can confirm we have the same issue when using image name like "xxx.dkr.ecr.eu-west-1.amazonaws.com/aaa/bbb@sha256:zzz". The issue is resolved if both Docker Commons and Docker pipeline plugins are reverted to previous versions (1.17 and 1.26 respectively). This seems to be caused by the recently added validation of the image name in response to SECURITY-1878 / CVE-2022-20617 ( https://www.jenkins.io/security/advisory/2022-01-12/#SECURITY-1878)  - obviously the validation is not robust enough and does not take into account such complex image names (which are still valid docker image names).

          I also encountered this. I am using ECR repos. 

          Travis Stevens added a comment - I also encountered this. I am using ECR repos. 

          As a workaround until this is fixed, you may use the system property org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.SKIP=true

          Allan BURDAJEWICZ added a comment - As a workaround until this is fixed, you may use the system property org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.SKIP=true

          fix released

          Michael Kriese added a comment - fix released

          Basil Crow added a comment -

          Basil Crow added a comment - Fixed in jenkinsci/docker-commons-plugin#93 . Released in 1.19 .

          Ramesh Audireddy added a comment - - edited

          viceice,

           

          I am still getting the same issue in my environment even after upgrading the docker-commons plugin.

          Installed Jenkins Version: Jenkins 2.328

           

          TAG FORMAT: <aftifact-version>-<BUILD_NUMBER>-SNAPSHOT (Ex: 4.0.0-119-SNAPSHOT)

           

          ERROR: Tag must follow the pattern &#039;^:[a-zA-Z0-9_]([a-zA-Z0-9_.-]){0,127}&#039; at hudson.util.FormValidation._errorWithMarkup(FormValidation.java:268) at hudson.util.FormValidation.errorWithMarkup(FormValidation.java:254) at hudson.util.FormValidation.error(FormValidation.java:145) at hudson.util.FormValidation.error(FormValidation.java:170)
          

           

          Thanks and Regards,

          Ramesh

           

          Ramesh Audireddy added a comment - - edited viceice ,   I am still getting the same issue in my environment even after upgrading the docker-commons plugin. Installed Jenkins Version:  Jenkins 2.328   TAG FORMAT: <aftifact-version>-<BUILD_NUMBER>-SNAPSHOT (Ex: 4.0.0-119-SNAPSHOT)   ERROR: Tag must follow the pattern &#039;^:[a-zA-Z0-9_]([a-zA-Z0-9_.-]){0,127}&#039; at hudson.util.FormValidation._errorWithMarkup(FormValidation.java:268) at hudson.util.FormValidation.errorWithMarkup(FormValidation.java:254) at hudson.util.FormValidation.error(FormValidation.java:145) at hudson.util.FormValidation.error(FormValidation.java:170)   Thanks and Regards, Ramesh  

          Paul "TBBle" Hampson added a comment - - edited

          Are you sure 4.0.0-119-SNAPSHOT is being passed through correctly? According to https://www.regextester.com/, that's a match for

          ^:[a-zA-Z0-9_]([a-zA-Z0-9_.-]){0,127}
          

          once you add : to the front (which is now included in the string passed to the validation).

          I suspect, similar to https://issues.jenkins.io/browse/JENKINS-67633?focusedCommentId=421313&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-421313 and https://github.com/jenkinsci/docker-commons-plugin/pull/93#issuecomment-1028331791, your variable-substitution string is being passed through unmodified, as it's no longer interpolated by the shell (due to SECURITY-1878), and so it's trying to apply a tag like ${ARTIFACT_VERSION}-${BUILD_NUMBER}-SNAPSHOT literally.

          viceice: It might be a useful enhancement for the error message to include the actual tag being checked, to help identify when users have depended on the now-removed shell interpolation behaviour.

          Paul "TBBle" Hampson added a comment - - edited Are you sure 4.0.0-119-SNAPSHOT is being passed through correctly? According to https://www.regextester.com/,  that's a match for ^:[a-zA-Z0-9_]([a-zA-Z0-9_.-]){0,127} once you add : to the front (which is now included in the string passed to the validation). I suspect, similar to https://issues.jenkins.io/browse/JENKINS-67633?focusedCommentId=421313&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-421313  and  https://github.com/jenkinsci/docker-commons-plugin/pull/93#issuecomment-1028331791 , your variable-substitution string is being passed through unmodified, as it's no longer interpolated by the shell (due to SECURITY-1878 ), and so it's trying to apply a tag like ${ARTIFACT_VERSION}-${BUILD_NUMBER}-SNAPSHOT literally. viceice : It might be a useful enhancement for the error message to include the actual tag being checked, to help identify when users have depended on the now-removed shell interpolation behaviour.

          p_hampson, Yes, it is passing correctly.

           

           
          ERROR: Tag must follow the pattern '^:[a-zA-Z0-9_]([a-zA-Z0-9_.-]){0,127}'
           
          09:26:41 ❻ root@5bf0d346a451:> Push Docker Image to DTR - https://<image-registry>:4.1.2-9-SNAPSHOT
           

          Thanks and Regards,

          Ramesh

          Ramesh Audireddy added a comment - p_hampson , Yes, it is passing correctly.     ERROR: Tag must follow the pattern '^: [a-zA-Z0-9_] ( [a-zA-Z0-9_.-] ){0,127}'   09:26:41 ❻ root@5bf0d346a451:> Push Docker Image to DTR - https://<image-registry>:4.1.2-9-SNAPSHOT   Thanks and Regards, Ramesh

          Paul "TBBle" Hampson added a comment - - edited

          I suggest raising this as a new bug, since it's no longer "image name validation regexp is too restrictive", and now is "For some reason, a regexp-valid name is being rejected or misprocessed".

          That way it'll have more visibility, since this issue is marked Resolved already.

          Side-note: Do you have https:// in your image name? That might be the issue, as I'm not sure if the code that breaks the image name up into components (registry, repository, tag, digest) takes into account that possibility. (I think it's technically invalid syntax by the spec, but works with the Docker CLI and probably most CLIs by compatibility)

          Paul "TBBle" Hampson added a comment - - edited I suggest raising this as a new bug, since it's no longer "image name validation regexp is too restrictive", and now is "For some reason, a regexp-valid name is being rejected or misprocessed". That way it'll have more visibility, since this issue is marked Resolved already. Side-note: Do you have https:// in your image name? That might be the issue, as I'm not sure if the code that breaks the image name up into components (registry, repository, tag, digest) takes into account that possibility. (I think it's technically invalid syntax by the spec, but works with the Docker CLI and probably most CLIs by compatibility)

          Hi p_hampson,

          Seems the https:// is not causing the issue as the tag is parsing if I remove the BUILD_NUMBER from the tag.

           

          Thanks and Regards,

          Ramesh

          Ramesh Audireddy added a comment - Hi p_hampson , Seems the https:// is not causing the issue as the tag is parsing if I remove the BUILD_NUMBER from the tag.   Thanks and Regards, Ramesh

          Well, I'm flummoxed. Open a new ticket, I suspect it's going to need a lot of logs to work out what's going on there, and probably parts of your Jenkinsfile (or a minimal reproduction) with the issue to allow further investigation.

          Paul "TBBle" Hampson added a comment - Well, I'm flummoxed. Open a new ticket, I suspect it's going to need a lot of logs to work out what's going on there, and probably parts of your Jenkinsfile (or a minimal reproduction) with the issue to allow further investigation.

          Thank you p_hampson.

          Have opened a new ticket for this.

          https://issues.jenkins.io/browse/JENKINS-67749

          Ramesh Audireddy added a comment - Thank you p_hampson . Have opened a new ticket for this. https://issues.jenkins.io/browse/JENKINS-67749

          I would be able to extend the error message, but not sure when i will have time for it. Should be pretty simple to do.

          I'm not a maintainer, i'm only a jenkins user and fixed a bug.

          Michael Kriese added a comment - I would be able to extend the error message, but not sure when i will have time for it. Should be pretty simple to do. I'm not a maintainer, i'm only a jenkins user and fixed a bug.

          Paul "TBBle" Hampson added a comment - - edited

          Ah, my mistake, I had tagged you only because I thought you were a maintainer. I should have checked first. (I didn't realise tickets here could be assigned to non-maintainers.)

          Paul "TBBle" Hampson added a comment - - edited Ah, my mistake, I had tagged you only because I thought you were a maintainer. I should have checked first. (I didn't realise tickets here could be assigned to non-maintainers.)

          Don't worry. You can nearly do anything here.

          Michael Kriese added a comment - Don't worry. You can nearly do anything here.

            viceice Michael Kriese
            viceice Michael Kriese
            Votes:
            6 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: