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

Document existence of steps global variable

    XMLWordPrintable

    Details

    • Similar Issues:
    • Sprint:
      Blue Ocean 1.4 - beta 2

      Description

      In Pipeline scripts, steps is bound to the DSL which has step definitions, and may be passed around as a regular object. Two use cases:

      • passing it to a loaded class which would not otherwise have Script bindings in scope
      • using it to disambiguate, in case you have defined a local function with the same name as a step

      Currently it seems this variable is not documented. It should be mentioned in cps-global-lib/README.md and/or TUTORIAL.md. Perhaps it should be registered as a GlobalVariable to make it more discoverable.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Global library documentation should also note that you can pass this (a Script) to classes which can then use the script to refer to not just steps but any global variable like env.

            Show
            jglick Jesse Glick added a comment - Global library documentation should also note that you can pass this (a Script ) to classes which can then use the script to refer to not just steps but any global variable like env .
            Hide
            jglick Jesse Glick added a comment -

            Global library documentation should also note

            Done as part of JENKINS-31155.

            Show
            jglick Jesse Glick added a comment - Global library documentation should also note Done as part of JENKINS-31155 .

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              jglick Jesse Glick
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: