How to use Build User Vars Plugin with Pipeline

Issue

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

Environment

Resolution

Example:

wrap([$class: 'BuildUser']) {
 // https://wiki.jenkins-ci.org/display/JENKINS/Build+User+Vars+Plugin variables available inside this block

  sh 'echo ${BUILD_USER}'
}

NOTE: Requires version 1.5 of Build User Vars Plugin

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.