I am getting issues with this implementation:
https://github.com/jenkinsci/generic-webhook-trigger-plugin/issues/319

I have been debugging it and I can see that if I 
1. Create a multibranch pipeline
2. Configure it with Git source and using 
g...@github.com:tomasbjerre/gwt-issue-314.git
3. Scan the repository
4. Trigger it with: curl -v 
"http://localhost:8080/jenkins/generic-webhook-trigger/invoke?token=abc123"; 
-d '{ "ref": "refs/heads/feature/test1"}' -H "Content-Type: 
application/json"
5. (bug) It will not find any jobs
6. Create new branch in gwt-issue-314
7. Scan multibranch
8. Trigger again with same curl
9. (bug) It will not find any jobs

When debugging I see that in 3 and 7 Jenkins will invoke "onCreated":
https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/3954ee99f8c8801877f6a9b998fe7fdcaa78e6d7/src/main/java/org/jenkinsci/plugins/gwt/jobfinder/JobFinderImpersonater.java#L73

Problem is that the job that is supplied to "onCreated" has no "triggers". 
I only keep track of jobs with my plugin configured, so no jobs will be 
stored. It might be intended to invoke "onCreated" before triggers are 
configured. But there should be an invocation of "onUpdated" when trigger 
is configured?

fredag 24 maj 2024 kl. 21:54:29 UTC+2 skrev jgl...@cloudbees.com:

> On Thu, May 23, 2024 at 2:12 PM 'Winter, Markus' via Jenkins Developers <
> jenkin...@googlegroups.com> wrote:
>
>> when posting an xml to update a job the ItemListener.onUpdated is not 
>> called. Only the Saveablelistener is called
>>
>
> I have noticed this as well and it feels like a bug. The workaround is to 
> use `SaveableListener` but ignore subjects which are not `Item`s. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/b0c3e795-d01e-47c5-9d62-a985ce84e7a9n%40googlegroups.com.

Reply via email to