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

          Oleg Nenashev added a comment -

          jbochenski yes, it requires a new step

          Oleg Nenashev added a comment - jbochenski yes, it requires a new step

          Oleg Nenashev added a comment -

          No plan to work on it anytime soon. Pull requests will be appreciated, reviewed and integrated if possible.

          Oleg Nenashev added a comment - No plan to work on it anytime soon. Pull requests will be appreciated, reviewed and integrated if possible.

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

              Created:
              Updated: