Singh
Singh

Reputation: 63

configure jenkinsfile to allow remote trigger for the job

How can I configure my jenkinsfile to allow for remote triggers in the job.

The option is available if I try to configure a regular job, as shown in the image below, but I could not figure out a way for the same via jenkinsfile. enter image description here

can someone help for the same.

Update: Trigger option available under jenkins' "pipeline syntax" help. enter image description here

Upvotes: 0

Views: 1139

Answers (1)

leputz
leputz

Reputation: 11

just add 'authenticationToken('token_name')' in the pipelineJob closure. It worked for me. See documentation: https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.WorkflowJob.authenticationToken

Upvotes: 1

Related Questions