Jenkins: 'Trigger Builds Remotely' with ?token not working when Matrix Authorization Strategy is used Jenkins: 'Trigger Builds Remotely' with ?token not working when Matrix Authorization Strategy is used jenkins jenkins

Jenkins: 'Trigger Builds Remotely' with ?token not working when Matrix Authorization Strategy is used


There's a new plugin that allows you to do that even when Jenkins prohibits anonymous read access:

Build Token Root Plugin

Use:

$ curl 'http://jenkins/buildByToken/build?job=jobname&token=mytoken'Scheduled.

Likewise with buildWithParameters.


Example for using the "Build Authorization Token Root" plugin with POST:

wget --post-data="job=MyJob&token=SECRET&MyParameter=hello" http://servername/jenkins/buildByToken/buildWithParameters

note that "Trigger Builds Remotely" must be activated for this job (with authorization token "SECRET")