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

Snippet Generator no longer includes global variables

    Details

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

      Description

      Since moving the Snippet Generator outside of jobs, it no longer includes the help docs from global variables.

        Attachments

          Issue Links

            Activity

            abayer Andrew Bayer created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Epic Link JENKINS-35393 [ 171186 ]
            Hide
            abayer Andrew Bayer added a comment -

            From https://github.com/jenkinsci/workflow-cps-plugin/commit/f3958997d201d39a952c6572eb623a8730b822d7, it looks like the Global Variable section from the old block.jelly wasn't copied over to the new index.jelly - Jesse Glick, was that a deliberate omission?

            Show
            abayer Andrew Bayer added a comment - From https://github.com/jenkinsci/workflow-cps-plugin/commit/f3958997d201d39a952c6572eb623a8730b822d7 , it looks like the Global Variable section from the old block.jelly wasn't copied over to the new index.jelly - Jesse Glick , was that a deliberate omission?
            abayer Andrew Bayer made changes -
            Assignee Kohsuke Kawaguchi [ kohsuke ] Jesse Glick [ jglick ]
            Hide
            abayer Andrew Bayer added a comment -

            I tried copy-pasting it into block.jelly and it didn't work - it gets the dropdown list of the GlobalVariable that are available but doesn't render the help.

            Show
            abayer Andrew Bayer added a comment - I tried copy-pasting it into block.jelly and it didn't work - it gets the dropdown list of the GlobalVariable that are available but doesn't render the help.
            Hide
            abayer Andrew Bayer added a comment -

            Whoops, when I moved it around it worked. PR incoming.

            Show
            abayer Andrew Bayer added a comment - Whoops, when I moved it around it worked. PR incoming.
            abayer Andrew Bayer made changes -
            Assignee Jesse Glick [ jglick ] Andrew Bayer [ abayer ]
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR 17 (Web Link)" [ 14422 ]
            Show
            abayer Andrew Bayer added a comment - PR up - https://github.com/jenkinsci/workflow-cps-plugin/pull/17
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            jglick Jesse Glick added a comment -

            Yes it was a deliberate omission.

            Show
            jglick Jesse Glick added a comment - Yes it was a deliberate omission.
            Show
            abayer Andrew Bayer added a comment - Latest PR - https://github.com/jenkinsci/workflow-cps-plugin/pull/18
            Hide
            bitwiseman Liam Newman added a comment -

            In my experience of Groovy the distinction between different ways to getting at things is pretty vague. I understand that a properties, methods, fields, and instances are diffent, but from a usage standpoint, the language seems to be designed to minimize one's awareness of those differences. From an end-user/pipeline-writer perspective, treating the global variables differently than we treat method is more confusing that helpful.

            Show
            bitwiseman Liam Newman added a comment - In my experience of Groovy the distinction between different ways to getting at things is pretty vague. I understand that a properties, methods, fields, and instances are diffent, but from a usage standpoint, the language seems to be designed to minimize one's awareness of those differences. From an end-user/pipeline-writer perspective, treating the global variables differently than we treat method is more confusing that helpful.
            Hide
            rtyler R. Tyler Croy added a comment -

            I'll second what Liam Newman is saying, as a Pipeline user, the distinction between different flavors of API reference documentation is not really relevant to me. With the docker variable, for example, there are methods hanging off of that which I think of, and work with, like other "steps".

            Show
            rtyler R. Tyler Croy added a comment - I'll second what Liam Newman is saying, as a Pipeline user, the distinction between different flavors of API reference documentation is not really relevant to me. With the docker variable, for example, there are methods hanging off of that which I think of, and work with, like other "steps".
            jglick Jesse Glick made changes -
            Component/s structs-plugin [ 21442 ]
            Hide
            jglick Jesse Glick added a comment -

            The docker variable is a different case, and to deal with that properly really requires a separate API: JENKINS-32731.

            Show
            jglick Jesse Glick added a comment - The docker variable is a different case, and to deal with that properly really requires a separate API: JENKINS-32731 .
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-32731 [ JENKINS-32731 ]
            Hide
            abayer Andrew Bayer added a comment -

            Actually got merged a while back.

            Show
            abayer Andrew Bayer added a comment - Actually got merged a while back.
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 171688 ] JNJira + In-Review [ 199150 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: