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

Pipeline Snippet generator does not create valid snippet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • pipeline
    • None

      In case you want to use Workflow (Pipeline plugin) with Docker integration, version 1.2, and you want to push something to a docker registry, you can generate the snippet using the snippet generator. The problem is that snippet generator creates an snippet using withDockerRegistry method. When you execute it you get next exception:

      hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.docker.workflow.Docker.withDockerRegistry() is applicable for argument types: 
      

      But if you change to use withRegistry instead of withDockerRegistry then it works.

      It also works if you do:

      withDockerRegistry(registry: [url: 'https://index.docker.io/v1/', credentialsId:'0bb7a6bc-5ae5-4d4b-a7d3-dc4893d747a6']) {
      

      Adding registry with an array.

            jglick Jesse Glick
            asotobueno Alex Soto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: