How to setup multibranch project with external triggers

29 views
Skip to first unread message

Rainer Hörbe

unread,
Jul 25, 2017, 6:14:15 AM7/25/17
to Jenkins Users
I want to trigger builds from an external script for different branches for a github-hosted repository. While this setup works with a pipeline job, I fail to configure it for a multibranch pipeline. When I try to enter a code for the API token, I find only a menu item "View Configuration" at the branch level, which does not allow me to save configuration changes. How would this work?

(The rational for triggering from an API is that there is no direct internet access for the Jenkins server for compliance reasons)

- Rainer

Rainer Hörbe

unread,
Aug 14, 2017, 4:22:46 PM8/14/17
to Jenkins Users
I tried this with the python-jenkins library. Same problem. Pripeline jobs builds can be triggered, but multibranch jobs fail.

I tried also 2 variants with the API, the buildByToken as anonymous user and the default API path for authenticated uses.


Daniel Butler

unread,
Aug 15, 2017, 7:46:23 AM8/15/17
to jenkins...@googlegroups.com

I’ve got triggering of Multibranches working using a user API token (from the users config page) and curl. You can’t set job specific tokens on multibranch.

e.g.

Curl -x POST http://jenkins:8080/test-multibranch/job/master/build -u user:0123456789abcedf0123456789abcdef

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d9a163a9-0c15-49a3-8a7c-e11eccd238b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Reply all
Reply to author
Forward
0 new messages