[Trigger Pipeline] Site.RequestJenkinsCrumbToken default value true a logical default?

Forge Component
(2)
Published on 21 Jun by Rui Mendes
2 votes
Published on 21 Jun by Rui Mendes

Took a while to figger out that to trigger succesfully a Jenkins Pipeline from with the LifeTime plugin, we had to change site property RequestJenkinsCrumbToken to False for espace TriggerPipeline.

My question is, does it make sense that this parameter is defaulted to True?

Hi Daniël,

Thanks for the feedback. 

The value is set to 'True' as default because, initially, the plugin was using user/password as credentials for triggering Jenkins pipelines, which requires a Jenkins Crumb when making REST API calls.

If you switch to using user/API token as credentials in the trigger configuration (which we now recommend), requesting a Jenkins Crumb is no longer needed so you can set the site property to 'False'. Nevertheless, it shouldn't generate an error when triggering the pipeline if you are using an API token and still requesting a Jenkins Crumb at the same time.

Cheers,

Rui Mendes

Hi,

You wrote:

Nevertheless, it shouldn't generate an error when triggering the pipeline if you are using an API token and still requesting a Jenkins Crumb at the same time.

It did and the error was it could not find the Crumb API method. Could this be an Jenkins version related issue.

But all is indeed working properly with the site property set to False.

Regards,

Daniel

Hi Daniël,

During our tests we were able to retrieve the Jenkins Crumb successfully using an API token, so the error you mention (Crumb API not found) is likely being caused by a Jenkins internal setting.

Glad to hear that the plugin is now working properly on your side.

Cheers,

Rui Mendes