Get username logged in Jenkins from Jenkins Workflow (Pipeline) Plugin

后端 未结 10 660
忘了有多久
忘了有多久 2020-12-25 12:36

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 ach

10条回答
  •  遥遥无期
    2020-12-25 12:46

    The Build User Vars Plugin is useful when you are executing the stage on an agent.

    The alternative is to use the current build clause (see https://code-maven.com/jenkins-get-current-user), which also works when your stage is set with agent none.

提交回复
热议问题