[OpenStack-Infra] ZUUL_NODE and multiple Jenkins labels
Antoine Musso
hashar at free.fr
Thu Sep 25 09:18:42 UTC 2014
Hello,
I am wondering how ZUUL_NODE works and overall how the Jenkins Gearman
plugin handles Jenkins labels.
My setup has slaves used for continuous integration and some others for
a staging cluster. I have Ubuntu Precise and Trusty nodes.
On my nodes I have applied labels such as:
contint001: contint, UbuntuPrecise
contint002: contint, UbuntuTrusty
staging001: staging, UbuntuPrecise
staging002: staging, UbuntuTrusty
In Jenkins job builder I thus AND labels to select where they will be
run. Ci jobs would have either:
node: contint && UbuntuPrecise
Or:
node: contint && UbuntuTrusty
Developers started willing to run python 3.4 jobs which is only
available on Trusty. The JJB template is straightforward but is tied to
Precise:
- job-template:
name: '{name}-tox-{toxenv}'
node: contint && UbuntuPrecise
builders:
- tox:
venv: '{toxenv}'
I would like to drop the UbuntuPrecise label and select it based on the
'toxenv' value. So:
- 'py27' would run on any slave having contint
- 'py34' would run on contint && UbuntuTrusty
I noticed the openstack_functions.py file which is used in Zuul to
finely tune ZUUL_NODE, and thus select a gearman label to run a job.
If the job name matches 'py34', I could set ZUUL_NODE=UbuntuTrusty, but
I am worried it is going to ignore the 'contint' label and thus run on
the staging cluster slaves labeled 'staging', UbuntuTrusty.
One way to fix it would be to copy paste '{name}-tox-{toxenv}' to a new
'{name}-tox-{toxenv}-trusty' which would have the UbuntuTrusty label.
But I would like to avoid repeating myself :-]
Am I missing something obvious?
--
Antoine "hashar" Musso
More information about the OpenStack-Infra
mailing list