From 72bd6977cf76e41e5b28a6e6d703ee189e81ec2b Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Mon, 7 Nov 2016 12:45:05 +0300 Subject: [PATCH] Require explicit list of publishers for each job Publisher are required for almost every job and it's very easy to forget to specify them and get a job that cannot be debugged. If publishers are not required for a job, one should explicitely specify empty list of publishers as I did here for test job and for rtfd hook. Change-Id: I7c4923910b0e139ca3831b6450b0fbb82b618b64 --- jenkins/jobs/hooks.yaml | 1 + jenkins/jobs/misc.yaml | 1 + tools/jenkins-projects-checks.py | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jenkins/jobs/hooks.yaml b/jenkins/jobs/hooks.yaml index 267d34d9c2..701d97e35a 100644 --- a/jenkins/jobs/hooks.yaml +++ b/jenkins/jobs/hooks.yaml @@ -5,3 +5,4 @@ builders: - revoke-sudo - shell: 'curl -X POST https://readthedocs.org/build/{name} >/dev/null' + publishers: [] diff --git a/jenkins/jobs/misc.yaml b/jenkins/jobs/misc.yaml index d569f26829..84346dd413 100644 --- a/jenkins/jobs/misc.yaml +++ b/jenkins/jobs/misc.yaml @@ -9,6 +9,7 @@ builders: - shell: 'echo ok' + publishers: [] - job-template: name: 'gate-{name}-run-tests' diff --git a/tools/jenkins-projects-checks.py b/tools/jenkins-projects-checks.py index 85acef4840..a9a75ca157 100755 --- a/tools/jenkins-projects-checks.py +++ b/tools/jenkins-projects-checks.py @@ -34,9 +34,9 @@ JOB = v.Schema({ v.Required('builders'): v.All(list), v.Required('name'): v.All(str), v.Required('node'): v.All(str), + v.Required('publishers'): v.All(list), 'description': v.All(str), 'parameters': v.All(list), - 'publishers': v.All(list), 'wrappers': v.All(list) }) @@ -50,8 +50,8 @@ JOB_TEMPLATE = v.Schema({ v.Required('builders'): v.All(list), v.Required('name'): v.All(str), v.Required('node'): v.All(str), + v.Required('publishers'): v.All(list), 'description': v.All(str), - 'publishers': v.All(list), 'wrappers': v.All(list) })