Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243164
Change subject: Experiment YAML aliases and template inheritance ...................................................................... Experiment YAML aliases and template inheritance The Jenkins jobs have been made generic to be triggered by any repository. A side effect is Zuul dependent pipeline (gate-and-submit) handles merging almost all of the projects in the same queue 'mediawiki'. As a result, a change unrelated to MediaWiki such as for integration/config ends up being queued behind mediawiki/core changes that takes a while to run. This experiment propose to split some jobs again, but instead of prefixing them with the repository name, prefix them with the queue they are intended for. JJB job-templates support default values for parameters when they are defined inside the job template. That let you invoke the job-template without defining the variable. YAML has support for merging mappings and then override given values. Abuse that feature to craft a back compatibility job 'phpunit' with an empty queue. That let us avoid copy pasting job-templates that solely vary on the name ('phpunit' vs '{queue}phpunit'). Change-Id: I17c650acce623c3a1356dfe57ab591335c2cd169 --- A jjb/jobs.yaml 1 file changed, 52 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/64/243164/1 diff --git a/jjb/jobs.yaml b/jjb/jobs.yaml new file mode 100644 index 0000000..66d1104 --- /dev/null +++ b/jjb/jobs.yaml @@ -0,0 +1,52 @@ +# Runs phplint on a repository +# +# Parameters: +# {queue} prefix for the job +- job-template: &phplint + name: '{queue}-phplint' + queue: '' + builders: + - shell: "echo QUEUE [{queue}]" + - shell: "echo NAME [{name}]" + +# Generates 'phplint' for back compatibility +# +# Solely to get rid of the '{queue}-' prefix when queue='' or it would +# generate a job named '-phplint' +- job-template: + !!merge : *phplint + name: phplint + +# Jobs that are not suffixed with any queue name: +- project: + name: 'generic-jobs' + jobs: + - 'phplint' + +# Generate per queue jobs to please Zuul dependent pipeline +- project: + name: queues-jobs + queue: + - analytics + - integration + - mwgate + jobs: + - '{queue}-phplint' + +# Generates +# +# Job name: analytics-phplint +# <command>echo QUEUE [analytics]</command> +# <command>echo NAME [queues-jobs]</command> +# +# Job name: integration-phplint +# <command>echo QUEUE [integration]</command> +# <command>echo NAME [queues-jobs]</command> +# +# Job name: mwgate-phplint +# <command>echo QUEUE [mwgate]</command> +# <command>echo NAME [queues-jobs]</command> +# +# Job name: phplint +# <command>echo QUEUE []</command> +# <command>echo NAME [generic-jobs]</command> -- To view, visit https://gerrit.wikimedia.org/r/243164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17c650acce623c3a1356dfe57ab591335c2cd169 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar <has...@free.fr> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits