Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins "Trigger builds remotely" > "Authentication Token" option missing

Tags:

I have just been working on setting up Jenkins (latest - 2.5) behind a reverse proxy with Nginx so that I can access it over HTTPS.

It's working, however my Multibranch Pipeline jobs no longer have the "Trigger Builds Remotely" option in the main config. I don't think I changed any other configurations. Any ideas what happened and how to get it back?

Here's what I want back:

Screenshot of what I want back

like image 970
MarkRoland Avatar asked Mar 15 '17 17:03

MarkRoland


People also ask

How do I trigger a build in Jenkins remotely?

Create a remote Jenkins build trigger in three stepsCreate a Jenkins build job and enable the Trigger builds remotely checkbox. Provide an authentication token; This can be any text string of your choice. Invoke the Jenkins build URL to remotely trigger the build job.

Which command is used to trigger build remotely in Jenkins?

In the new Jenkins Pipeline, under Build Triggers, select the checkbox Trigger builds remotely (e.g., from scripts). Then give Jenkins a token that will be required when triggering the build.

What is Jenkins build token?

The purpose of the Authentication Token is to allow unauthorized users (developers) to trigger a build without having login access to Jenkins (see https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients and https://wiki.jenkins-ci.org/display/JENKINS/Quick+and+Simple+Security).


1 Answers

After some time and searching around, I think I am able to answer my own question with some confidence.

I believe the answer lies within the security settings. The purpose of the Authentication Token is to allow unauthorized users (developers) to trigger a build without having login access to Jenkins (see https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients and https://wiki.jenkins-ci.org/display/JENKINS/Quick+and+Simple+Security).

So if you are using Matrix-based security (under "Configure Global Security" >> Authorization), then the "Trigger builds remotely" option will go away because it is presumed that you will be authenticating requests using a Jenkins user account.

In order to do that you can make an HTTP request with the username/password (or even better username/API Token):

curl -X POST "https://username:api-token@JENKINS_URL/job/Example/build" 
like image 191
MarkRoland Avatar answered Oct 14 '22 19:10

MarkRoland