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

Snippet generator sometimes produces incorrect snippets

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

      Snippet generator sometimes produces incorrect snippets like:

      checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], extensions: [<object of type hudson.plugins.git.extensions.impl.CleanCheckout>], userRemoteConfigs: [[credentialsId: '4db1f14a-c479-48af-a3ea-da676bc2b051', url: 'https://github.com/XXXXXX/XXXXXXXXXX.git']]]
      

      Here the extensions: [<object of type hudson.plugins.git.extensions.impl.CleanCheckout>] doesn't look like a valid Groovy syntax.
      I think if the object reference can't be generated (probably it can be) it should be made more explicit that this construct does not work.

          [JENKINS-26753] Snippet generator sometimes produces incorrect snippets

          Timur Batyrshin created issue -

          Jesse Glick added a comment -

          Currently you need to fix the syntax up manually.

          Jesse Glick added a comment - Currently you need to fix the syntax up manually.
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-26619 [ JENKINS-26619 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160920 ] New: JNJira + In-Review [ 196581 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

          jay hendren added a comment -

          jglick ok, but what would be the correct syntax? As a non-Groovy-expert, it's really difficult for me to guess.

          jay hendren added a comment - jglick ok, but what would be the correct syntax? As a non-Groovy-expert, it's really difficult for me to guess.

          Jesse Glick added a comment -

          Just update plugins to pick up the fix of JENKINS-26619.

          Jesse Glick added a comment - Just update plugins to pick up the fix of JENKINS-26619 .

            jglick Jesse Glick
            erthad Timur Batyrshin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: