How to use Build User Vars Plugin with Pipeline?

Article ID:226287607
1 minute readKnowledge base

Issue

How do I access variables provided by Build User Vars Plugin in Pipeline jobs.

Environment

Resolution

Example:

wrap([$class: 'BuildUser']) {
 // https://plugins.jenkins.io/build-user-vars-plugin/ variables available inside this block

  sh 'echo ${BUILD_USER}'
}

NOTE: Requires version 1.5 of Build User Vars Plugin