Zuul can only invoke ONE parameter function for a job and the job would need two:
- set PHP_BIN to switch to PHP5
- set EXT_DEPENDENCIES
+ - name: ^.*php55.*$ + parameter-function: set_php_bin
Since it matches mwext-testextension-php55, that overrides the dependency injector :-/
Seems like we will need a single parameter function to be applied on all jobs and port the job regex to the parameter function which will then invoke other functions as needed. Something like:
jobs: - name: ^.*$ parameter-function: 'set_parameters'
And our custom set_parameters method would looks like:
import re def set_parameters(item, job, params): if 'php55' in job.name: params['PHP_BIN'] = 'php5' if re.match( /^mwext-(testextension|qunit|mw-selenium)/, job.name: params = set_ext_dependencies(item, job params) ... def set_ext_dependencies(item, job, params): # currently existing function
So this way we have all jobs being applied set_parameters and instead of dealing with job filter in the layout file, we deal with them in the python file.
Not much idea how to write an integration test that will cover that though. The parameter function is being called in zuul/launcher/gearman.py by Gearman.updateBuildParams. Unit tests for a new set_parameters() function would probably be sufficient.