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

Pipeline Snippet generator does not create valid snippet

    • 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.

          [JENKINS-32674] Pipeline Snippet generator does not create valid snippet

          Alex Soto created issue -
          Alex Soto made changes -
          Description Original: 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:

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

          But if you change to use _withRegistry_ instead of _withDockerRegistry_ then it works.
          New: 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:

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

          But if you change to use _withRegistry_ instead of _withDockerRegistry_ then it works.

          It also works if you do:

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

          Adding registry with an array.
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-29711 [ JENKINS-29711 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 168333 ] New: JNJira + In-Review [ 198402 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

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

              Created:
              Updated:
              Resolved: