user1164061
user1164061

Reputation: 4352

Find who started the build in Jenkins and take some action

I need to execute a set of steps based on who starts the build. For e.g, if user A starts the build in Jenkins then I need to call pgmA in Jenkins and if user B starts the build I need to call pgmB.

Is there any plugin or any other way which will help me identify who started the build?

Thanks

Upvotes: 3

Views: 1054

Answers (1)

gareth_bowles
gareth_bowles

Reputation: 21140

In the Jenkins UI, the reason a build was started is shown on the

http://jenkinshost/job/jobname/buildnumber

page. Note that builds can be started in multiple ways:

  • Manually by a user
  • By an SCM change
  • Triggered by an upstream build
  • Triggered by the scheduler

So there isn't a single place where you can see who triggered the build.

If you want to get the information programatically, take a look at http://jenkinshost/job/jobname/buildnumber/api

Upvotes: 3

Related Questions