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

Snippet Generator no longer includes global variables

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • pipeline
    • None

    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 ]
            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 - jglick, was that a deliberate omission?

            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 - jglick , was that a deliberate omission?
            abayer Andrew Bayer made changes -
            Assignee Kohsuke Kawaguchi [ kohsuke ] Jesse Glick [ jglick ]
            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.

            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.
            abayer Andrew Bayer added a comment -

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

            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 ]
            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 ]
            jglick Jesse Glick added a comment -

            Yes it was a deliberate omission.

            jglick Jesse Glick added a comment - Yes it was a deliberate omission.
            abayer Andrew Bayer added a comment - Latest PR - https://github.com/jenkinsci/workflow-cps-plugin/pull/18
            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.

            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.
            rtyler R. Tyler Croy added a comment -

            I'll second what bitwiseman 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".

            rtyler R. Tyler Croy added a comment - I'll second what bitwiseman 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 ]
            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 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 ]
            abayer Andrew Bayer added a comment -

            Actually got merged a while back.

            abayer Andrew Bayer added a comment - Actually got merged a while back.
            abayer Andrew Bayer made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            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

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

              Dates

                Created:
                Updated:
                Resolved: