Sometimes it is useful to directly work with Jenkins model objects from a Workflow, such as the FilePath representing the workspace for the enclosing node block. Currently you cannot access these. It would be useful to have a Step which just gave access to a specified contextual object (given as a String class name I suppose). Typically you would need to run in whole-script approval mode, since relevant methods on such objects are not likely to be safe to whitelist for use from the sandbox.

          [JENKINS-28385] Step to obtain raw contextual objects

          Jesse Glick created issue -
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 163223 ] New: JNJira + In-Review [ 181140 ]

          Jesse Glick added a comment -

          Might be useful in some cases for JENKINS-37011.

          Jesse Glick added a comment - Might be useful in some cases for JENKINS-37011 .
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-37011 [ JENKINS-37011 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Component/s New: workflow-basic-steps-plugin [ 21712 ]
          Component/s Original: pipeline [ 21692 ]

          Jesse Glick added a comment -

          For JENKINS-37011 or trusted libraries it would perhaps be useful to have two (advanced!) steps: context, taking a Class (no need for Snippetizer support), and returning Object; and withContext, taking Object and a block. The combination could allow AntStepExecution in ant PR 22 to bypass ConsoleLogFilterStep.

          Jesse Glick added a comment - For JENKINS-37011 or trusted libraries it would perhaps be useful to have two (advanced!) steps: context , taking a Class (no need for Snippetizer support), and returning Object ; and withContext , taking Object and a block. The combination could allow AntStepExecution in ant PR 22 to bypass ConsoleLogFilterStep .
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 25 (Web Link)" [ 14971 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: