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

Pipeline Snippet generator does not create valid snippet

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            First of all, you should not use the internal steps unless you really know what you are doing. Use the docker DSL, whose syntax is documented under the global variables section.

            Show
            jglick Jesse Glick added a comment - First of all, you should not use the internal steps unless you really know what you are doing. Use the docker DSL, whose syntax is documented under the global variables section.

              People

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

                Dates

                Created:
                Updated:
                Resolved: