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

Snippet Generator no longer includes global variables

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

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

          [JENKINS-35395] Snippet Generator no longer includes global variables

          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?

          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?

          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.

          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.

          Andrew Bayer added a comment -

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

          Andrew Bayer added a comment - Whoops, when I moved it around it worked. PR incoming.

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - PR up - https://github.com/jenkinsci/workflow-cps-plugin/pull/17

          Jesse Glick added a comment -

          Yes it was a deliberate omission.

          Jesse Glick added a comment - Yes it was a deliberate omission.

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - Latest PR - https://github.com/jenkinsci/workflow-cps-plugin/pull/18

          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.

          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.

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

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

          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.

          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 .

          Andrew Bayer added a comment -

          Actually got merged a while back.

          Andrew Bayer added a comment - Actually got merged a while back.

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

              Created:
              Updated:
              Resolved: