Hello,

I am currently setting up a CI infrastructure using Gerrit, Openstack Zuul 
server and Jenkins with Gearman plugin. The infrastructure does not run on 
openstack but uses the zuul server/merger. Zuul is working pretty well up to 
now. Changes in gerrit are detected and the related Jenkins job gets triggered.

Up to now the triggered Jenkins jobs was just a kind of dummy job with some 
echo hello world outputs directly executed on the Jenkins master. Now the 
Jenkins job shall be configured to be executed within a docker container using 
the Jenkins Docker Plugin 
(https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin).
As launch method 'Docker Once Retention Strategy' is configured in the docker 
cloud/ template. Behavior of this strategy is: 'For each job in the queue, an 
own docker container is started. Once the job has finished, the container is 
shut down.'. As described in the Docker Plugin wiki the Jenkins job option 
'Restrict where this project can be run' is enabled and the related label of 
the docker template is set.

The problem:
When triggering the Jenkins job manually, a Docker container is spinned-up 
automatically, the job gets executed inside the container and finally the 
container gets shut down. Expected behavior.
But when the same Jenkins job is triggered by Zuul/Gearman the jobs stucks in 
the Zuul/Gearman queue (zuul status page says state='queued').
It seems like Gearman prevents triggering the Jenkins Job because no node is 
already only which can service the configured label. The node gets first 
spinned-up by the docker plugin when the jobs is started.

Workaround:
Current workaround is a manual setup of Jenkins Nodes and manual start of the 
docker containers.
Drawback is the missing 'feature' of getting a clean environment for every 
executed build.

Does anyone has an idea how to overcome the described problem?
Or is this an issue/design topic in the Jenkins gearman plugin?


Thank you very much for your help
Sebastian Waldvogel



_______________________________________________
OpenStack-Infra mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra

Reply via email to