Hi,
When I integrated Jenkins through azure devops, and executed the pipeline, the pipeline is failing with below error
Job creation failed.
HttpResponse.statusCode=403
HttpResponse.statusMessage=No valid crumb was included in the request
Jenkins Version used is 2.190.3
Here i tried below options
YAML snippet which we used for Jenkins queue job
task: JenkinsQueueJob@2
displayName: 'Queue Jenkins job: Project_test'
inputs:
serverEndpoint: 'abc_cd_ef'
jobName: 'Project_test'
isParameterizedJob: true
jobParameters:
foldername=$(Agent.Name)
filename=${{ parameters.filename }}
Please let me know how to resolve this issue as we are stuck with this error for the last couple of days.
+1
One observation made when comparing another instance that is still working with an older version of Jenkins (2.164.3) is that the crumb value length seems to have doubled in the latest version mentioned above in the post. Could that be causing an incompatibility with Azure task? The length of the new crumb value is 64 characters whereas the old Jenkins version generates 32 character crumb value.
Update on above issue, after downgraded to Jenkins version 2.164.3 and TFS plugin 5.142.0 , i was able to build my pipeline successfully. Even though it is a bug in Jenkins, later point of time it will come as an issue. So this issue needs to be fixed.Please let me know if any updates.
+1
Can confirm that I ran into 403s queuing a Jenkins job on a server running 2.190.1. Running against Jenkins 2.164.3 instead seems to work fine. Error message (without system.debug) is:
Job creation failed.
HttpResponse.statusCode=403
HttpResponse.statusMessage=Forbidden
Any ETA on when this is expected to be fixed or what the release/fix schedule is like for these ADO tasks?
+1
This appears to be a result of security changes in Jenkins and how the same sessionid associated with the crumb request must be carried on with any following requests using that crumb.
Details: https://jenkins.io/doc/upgrade-guide/2.176/#upgrading-to-jenkins-lts-2-176-3
I'm looking at what can be done to get this working again with minor changes and will report back if I can find anything useful.
Alternatively, the task can allow the option to use API tokens instead of user/pass authentication?
Update: Note if you're still struggling with this, it appears that you can just replace the password in the service connection with a generate token associated with that account.
Ref: https://wiki.jenkins.io/display/JENKINS/Remote+access+API
Tested to work against jenkins v2.204.5.
Update:Using Jenkins version 2.230 and TFS plugin 5.157 i was able to build pipeline in azure devops. During this process got an error
Job creation failed.
HttpResponse.statusCode=403
HttpResponse.statusMessage=Forbidden
To solve above issue tried solution suggested by "tareks commented on 18 Mar". It worked for me and i was able to build my pipeline successfully.
Most helpful comment
Update: Note if you're still struggling with this, it appears that you can just replace the password in the service connection with a generate token associated with that account.
Ref: https://wiki.jenkins.io/display/JENKINS/Remote+access+API
Tested to work against jenkins v2.204.5.