0

Is it possible to trigger a jenkins job only via Jenkins' remote API?

I want that job triggered remotely by a script. That's because the script takes care of test data setup. But sometimes someone triggers the job via the web frontend which results in a failure because of missing test data.

So how can I forbid anyone from triggering the build via the frontend?

Sandra
  • 3,560
  • 5
  • 24
  • 31

1 Answers1

0

Yes you can, the solution is here here, depending on what you mean by script you will need to issue a post command from the command line (you don't say if you are using Windoes or *nix) details here.

how can I forbid anyone from triggering the build via the frontend?

Enable security and disable the build or all builds depending on your set up see here

Community
  • 1
  • 1
GrahamA
  • 5,875
  • 29
  • 39
  • There isn't a solution that doesn't require administrative rights on jenkins, is there? – Sandra Jan 22 '14 at 16:58
  • @Fynn for which part, the API call will depend on your security settings - I don't think you need admin rights. To change the build settings - you will need right for the job(s) but not necessary admin rights it will depend on your security settings – GrahamA Jan 22 '14 at 17:31
  • The API call is of no concern right now, that's working just fine. However, as a normal developer I don't have access to anything regarding Managing Jenkins.. – Sandra Jan 23 '14 at 09:05