Get username logged in Jenkins from Jenkins Workflow (Pipeline) Plugin
问题 I am using the Pipeline plugin in Jenkins by Clouldbees (the name was Workflow plugin before), I am trying to get the user name in the Groovy script but I am not able to achieve it. stage 'checkout svn' node('master') { // Get the user name logged in Jenkins } 回答1: Did you try installing the Build User Vars plugin? If so, you should be able to run node { wrap([$class: 'BuildUser']) { def user = env.BUILD_USER_ID } } or similar. 回答2: To make it work with Jenkins Pipeline: Install user build