When triggering a job with a Gerrit ref-updated event (such as the publish: pipeline), zuul-cloner bails out because the job is missing parameters:
$ zuul-cloner --version Zuul version: 2.0.0.288.gf0e3688 $ $ zuul-cloner --color --verbose \ --map zuul-clonemap.yaml --workspace src \ https://gerrit.wikimedia.org/r/p mediawiki/core mediawiki/vendor usage: zuul-cloner [-h] [-m CLONE_MAP_FILE] [--workspace WORKSPACE] [-v] [--color] [--version] [--cache-dir CACHE_DIR] [--branch BRANCH] [--project-branch PROJECT=BRANCH] [--zuul-branch $ZUUL_BRANCH] [--zuul-change $ZUUL_CHANGE] [--zuul-patchset $ZUUL_PATCHSET] [--zuul-pipeline $ZUUL_PIPELINE] [--zuul-project $ZUUL_PROJECT] [--zuul-ref $ZUUL_REF] [--zuul-url $ZUUL_URL] git_base_url projects [projects ...] zuul-cloner: error: Some Zuul parameters are not properly set: zuul_branch zuul_change zuul_patchset Define them either via environment variables or using options above. $
Parameters used while pushing a fake tag test-hashar-for-ci on mediawiki/core:
BASE_LOG_PATH="6c/6c8aabbdff141872f6789eaec3f32982df5ef1c0g" DOC_SUBPATH="test-hashar-for-ci" LOG_PATH="6c/6c8aabbdff141872f6789eaec3f32982df5ef1c0/publish/mediawiki-core-doxygen-publish/e228fac" ZUUL_UUID="e228fac55fa34eeab7f881c34df47417" ZUUL_COMMIT="6c8aabbdff141872f6789eaec3f32982df5ef1c0" ZUUL_NEWREV="6c8aabbdff141872f6789eaec3f32982df5ef1c0g" ZUUL_OLDREV="0000000000000000000000000000000000000000" ZUUL_PIPELINE="publish" ZUUL_PROJECT="mediawiki/core" ZUUL_REF="refs/tags/test-hashar-for-ci" ZUUL_REFNAME="refs/tags/test-hashar-for-ci" ZUUL_URL="git://zuul.eqiad.wmnet"
From Zuul zuul/launcher/gearman.py file:
# This is what we should be heading toward for parameters: # required: # ZUUL_UUID # ZUUL_REF (/refs/zuul/..., /refs/tags/foo, master) # ZUUL_COMMIT # optional: # ZUUL_PROJECT # ZUUL_PIPELINE # optional (changes only): # ZUUL_BRANCH # ZUUL_CHANGE # ZUUL_CHANGE_IDS # ZUUL_PATCHSET # optional (ref updated only): # ZUUL_OLDREV # ZUUL_NEWREV
So zuul-cloner should gain the ability to be triggered with two different set of parameters, one for changes, the other for ref updates.