In the Zuul gearman logging configuration I created a new DEBUG logger for the qualifier 'gear.Server'. That class has interesting debugging messages such as packet handling, registration of functions and reset of all functions.
------------
Test 1 - web interface:
I have clicked the 'New item' link, create a new freestyle project with the name 'MyJob'
The Gearman plugin did send a packet to reset all functions and properly registered a function 'build:MyJob'.
I am being shown the form to configure the job. Click save, all functions are reset and reregistered. 'build:MyJob' is properly registered with whatever labels I might have come up with.
Test 2 - JJB
I create a dummy job named 'MyJJBJob'
In the web interface the job is shown.
No packet have been sent by the Gearman plugin.
------------
With my limited Java and Jenkins API knowledge, the the Gearman plugin has an implementation of 'SaveableListener' ( http://javadoc.jenkins-ci.org/hudson/model/listeners/SaveableListener.html ) which would react on save. I guess that event is emitted via the web form but not on creation of item via the API.
I have give it a try again today.
In the Zuul gearman logging configuration I created a new DEBUG logger for the qualifier 'gear.Server'. That class has interesting debugging messages such as packet handling, registration of functions and reset of all functions.
------------
Test 1 - web interface:
I have clicked the 'New item' link, create a new freestyle project with the name 'MyJob'
The Gearman plugin did send a packet to reset all functions and properly registered a function 'build:MyJob'.
I am being shown the form to configure the job. Click save, all functions are reset and reregistered. 'build:MyJob' is properly registered with whatever labels I might have come up with.
Test 2 - JJB
I create a dummy job named 'MyJJBJob'
In the web interface the job is shown.
No packet have been sent by the Gearman plugin.
------------
With my limited Java and Jenkins API knowledge, the the Gearman plugin has an implementation of 'SaveableListener' ( http:// javadoc. jenkins- ci.org/ hudson/ model/listeners /SaveableListen er.html ) which would react on save. I guess that event is emitted via the web form but not on creation of item via the API.
There is another one 'ItemListener' which might be triggered on creation of jobs via the rest API: http:// javadoc. jenkins- ci.org/ hudson/ model/listeners /ItemListener. html