Closed CarryWll closed 4 months ago
You give it the master branch in your example, you should change that to refs/heads/dev
.
curl -v "http://JENKINS-SERVER/generic-webhook-trigger/invoke?token=123456" -H "Content-Type: application/json" -d "{\"ref\": \"refs/heads/dev\"}"
You also need to scan with multibranch pipeline. After that, verify that the job is created and with the intended configuration.
Once you have a job configured, try with the curl command again.
You give it the master branch in your example, you should change that to
refs/heads/dev
.
curl -v "http://JENKINS-SERVER/generic-webhook-trigger/invoke?token=123456" -H "Content-Type: application/json" -d "{\"ref\": \"refs/heads/dev\"}"
You also need to scan with multibranch pipeline. After that, verify that the job is created and with the intended configuration.
Once you have a job configured, try with the curl command again.
I changed master to dev, still the same error result.
{"jobs":null,"message":"Did not find any jobs with GenericTrigger configured!\nA token was supplied.\n"}
and My multi-branch pipeline has been successfully configured, but it is not editable on the interface. It is automatically generated from Jenkinsfile.
You can try restart Jenkins. If that solves it, it might be same problem as #311 #312
You can try restart Jenkins. If that solves it, it might be same problem as #311 #312
Thank you @tomasbjerre , The problem was successfully solved after restart.
Jenkins and plugins versions report
Because Jenkins multi-branch pipeline has no interface to set generic-webhook-trigger-plugin So after I add and complete the above file, I scan the entire project, and I can check the configuration on the page. ,But I http://127.0.0.1:8080/generic-webhook-trigger/invoke?token=123456 The result is:
response result: