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

Cannot set repository as parameter in plugin 'CloudBees Docker Build and Publish plugin'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins v2.361.4
      CloudBees Docker Build and Publish plugin version 1.4.0

      In Jenkins job, use parameter ${SERVICE_NAME} in repository, but still got failed. 

       

      Error log from Jenkins is as below.
      ERROR: Name must follow the pattern '^[a-zA-Z0-9]((\.||_|-)[a-zA-Z0-9]+)*$'
      ERROR: Name must follow the pattern '^[a-zA-Z0-9]((\.||_|-)[a-zA-Z0-9]+)*$'
      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)
      at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateName(ImageNameValidator.java:289)
      at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateUserAndRepo(ImageNameValidator.java:115)
      at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.imageName(DockerRegistryEndpoint.java:331)
      at com.cloudbees.dockerpublish.DockerBuilder.getRepo(DockerBuilder.java:252)
      at com.cloudbees.dockerpublish.DockerBuilder$Perform.getImageTags(DockerBuilder.java:336)
      at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:305)
      at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:291)
      at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:262)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:816)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:164)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524)
      at hudson.model.Run.execute(Run.java:1899)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
      at hudson.model.ResourceController.execute(ResourceController.java:107)
      at hudson.model.Executor.run(Executor.java:449)
      Build step 'Docker Build and Publish' marked build as failure

            csanchez Carlos Sanchez
            kewywwq Vicky
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: