If you use

              wrap([$class: 'MaskPasswordsBuildWrapper']) {
                  // commands here
              }
      

      outside of a node block the workflow will fail with

      org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
      	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:260)
      

      It's a hassle to have to wrap every individual node with this

          [JENKINS-44771] Mask Passwords should not require node

          Jakub Bochenski created issue -
          Jakub Bochenski made changes -
          Link New: This issue relates to JENKINS-44741 [ JENKINS-44741 ]
          Jakub Bochenski made changes -
          Component/s New: mask-passwords-plugin [ 15761 ]
          Component/s Original: timestamper-plugin [ 15749 ]
          Jakub Bochenski made changes -
          Issue Type Original: New Feature [ 2 ] New: Improvement [ 4 ]
          Jakub Bochenski made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Jakub Bochenski made changes -
          Environment Original: jenkins 1.609.2
          workflow 1.10-beta1
          timestamper 1.7.2
          Jakub Bochenski made changes -
          Assignee Original: Steven G Brown [ stevengbrown ] New: Oleg Nenashev [ oleg_nenashev ]
          Jakub Bochenski made changes -
          Description Original: it is not possible to wrap all the logs from workflow with timestamps.

          if you use
          {noformat}
                  wrap([$class: 'TimestamperBuildWrapper']) {
                      // commands here
                  }
          {noformat}

          outside of a node block the workflow will fail with
          {noformat}
          org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
          at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:126)
          {noformat}

          The reason for wrapping outside of a node is that you may want to be using some steps that do not require a workspace - e.g.
          {{echo}} before and after an {{input}}.
          New: If you use
          {noformat}
                  wrap([$class: 'MaskPasswordsBuildWrapper']) {
                      // commands here
                  }
          {noformat}

          outside of a node block the workflow will fail with
          {noformat}
          org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
          at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:126)
          {noformat}

          It's a hassle to have to wrap every individual node with this
          Jakub Bochenski made changes -
          Link New: This issue relates to JENKINS-30142 [ JENKINS-30142 ]

          Jakub Bochenski added a comment - I think this requires a custom workflow step, as per https://issues.jenkins-ci.org/browse/JENKINS-30142?focusedCommentId=235739&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235739

            Unassigned Unassigned
            jbochenski Jakub Bochenski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: