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

Ability to mark a SimpleBuildStep as not requiring a workspace context

    • jenkins 2.258, workflow-basic-steps 2.22

      Currently SimpleBuildStep expects to be passed a valid FilePath workspace, limiting its use in Pipelines to step appearing inside a node block. This is because BuildStep historically ran in an AbstractBuild which always has a workspace. But there are many build steps, especially Publisher but sometimes also Builder, which do not actually use the workspace (or node) at all, and these are needlessly blocked from being used outside a node block.

      Would be useful to have a SimpleBuildStepDescriptor defining a method which would allow an implementation to declare that the workspace and launcher parameters to perform may be null. CoreStep would then be able to run in any context, passing those parameters only if the StepContext defined them.

      SimpleBuildWrapper could potentially benefit from a similar API. This would have been useful for TimestamperBuildWrapper, avoiding the need for a separate TimestamperStep.

          [JENKINS-46175] Ability to mark a SimpleBuildStep as not requiring a workspace context

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-29144 [ JENKINS-29144 ]
          Tim Van Holder made changes -
          Assignee New: Tim Van Holder [ zastai ]
          Tim Van Holder made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Tim Van Holder made changes -
          Remote Link New: This issue links to "PR on jenkins (Web Link)" [ 25206 ]
          Tim Van Holder made changes -
          Remote Link New: This issue links to "PR on workflow-basic-steps (Web Link)" [ 26005 ]
          Tim Van Holder made changes -
          Released As New: jenkins 2.258, workflow-basic-steps 2.22
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            zastai Tim Van Holder
            jglick Jesse Glick
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: