15 Commits

Author SHA1 Message Date
Andreas Jaeger
0dd9b060fd Check that 'run-tox' is used instead of 'tox'
We're using now 'run-tox' as builder for tox instead of the previous
'tox' one. Add a check so that new changes do not introduce 'tox'
builder again.

Change-Id: I5fe91898807206b87901f8b3cefa6bc4c52ff52e
2016-11-15 18:10:11 +01:00
Yuriy Taraday
72bd6977cf 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
2016-11-07 12:45:05 +03:00
Andreas Jaeger
a9529b5063 Require node: for jobs in JJB
Enhance jenkins-projects-checks.py so that node entries are required.

This needs a fix for jenkins/jobs/misc.yaml where a job was used without
node.

This would have caught the missing node entry for fuel-ccp-validator:

Failure: required key not provided @ data['node']
Failure in file jenkins/jobs/fuel-ccp.yaml
Failure parsing item:
OrderedDict([('job', OrderedDict([('name', 'gate-fuel-ccp-validate'),
('builders', ['revoke-sudo', 'clone-fuel-ccp', OrderedDict([('shell',
'#!/bin/bash -xe\ncd "$WORKSPACE/fuel-ccp/tools/gate"\n./run.sh\n')])]),
('publishers', ['console-log'])]))])

Change-Id: I77c34d104d7fe47e6dd47ec7ac64721c5fe738a7
2016-11-04 06:37:25 +01:00
Andreas Jaeger
19ea9dcda2 Translate releasenotes
Add a new script to build release notes including translation,
we will run this script as part of each release notes build.

The new script will build releasenotes and all translations for them.
It checks for available translations and only builds for these.

The translated releasenotes are published in-tree, so for
trove-dashboard this would publish:
/releasenotes/trove-dashboard # Original untranslated content
/releasenotes/trove-dashboard/ja/  # Japanese translation
/releasenotes/trove-dashboard/ko_KR/ # Korean translation

The index file gets automatically enhanced to include
links to the translated releasenotes.

A preview of the generated release notes are at:
http://users.suse.com/~aj/horizon-releasenotes/
http://users.suse.com/~aj/trove-dashboard-releasenotes/

Include the file directly in JJB so that it can be changed anytime.
For details, see:
http://docs.openstack.org/infra/jenkins-job-builder/definition.html#module-jenkins_jobs.local_yaml

This needs a change for jenkins-projects-checks.py: The yaml is now an
extented yaml, use the JJB yaml loader to parse it.

For now, use a separate job gate-{name}-i18n-releasenotes-nv and add it
only to horizon and openstack-manuals so that we can evaluate that this
works as expected. A followup will add this for all jobs and the
publishing as well.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ic64d571a91bc1bd292d45c0f6ba1a67bfee75997
2016-10-07 10:58:28 +02:00
gadirajv
fc7e61c5de Fixes python 3 syntax issues with missing parentheses in call to 'print'
Original file causes jenkins-project to fail in python 3 with the
following error at L158 and L172:

   SyntaxError: missing parenthesis in call to 'print'

This patch fixes those syntax errors so jenkins-project will not fail
in python 3

Change-Id: I04ad04ac7f418effe01971253c4ea2368fcc4188
2016-09-09 23:03:12 +00:00
Frédéric Guillot
0d290bd349 Remove whitespaces and add parenthesis to print statements
Change-Id: I0cab05343b1845f92b4c606e4f2d573faf871103
2016-08-24 16:48:09 -04:00
Paul Belanger
35794c58ac Add console-log validator
We want to check if console-log is used as a publisher, it is the last
publisher defined. This is for zuulv25 specifically as we also use the
console-log publisher to upload our zuul-launcher logs.

Change-Id: I1c987158be13f90e382fcaec8c7d133ed595e177
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-06-17 06:08:08 +00:00
Angus Lees
65916bfdb4 Report actual error in error message
While debugging a YAML change just now, I found it impossible to work
out what jenkins-projects-checks.py was actually complaining about
without this additional information.  I thought others might benefit
from it too.

Change-Id: I79b8286a3ef74008e5b0927bddb60f9c98b9b629
2016-01-15 11:11:19 +11:00
Andreas Jaeger
17439f6409 Add description label to jenkins checker
Allow description in more entries for JJB checks.

Change-Id: Id7ab6c274049d435eb5d429f56bc988bb3578eb7
2015-12-21 21:11:25 +01:00
Paul Belanger
8ccd1d987e Start validating JJB job-templates
Initial commit to validate some JJB files. This validates
for existence of required sections and where possible that no additional
ones are available.

It will catch some errors that the JJB parser misses, since JJB ignores
unknown entries.

Change-Id: I51606d7066af7d5761f09655eead48883f7f56dc
Co-Authored-By: Andreas Jaeger <aj@suse.com>
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-16 08:46:46 +01:00
Andreas Jaeger
67f162671d Resort jenkins/jobs/projects.yaml
Sort the file in alphabetical order and update
tools/jenkins-projects-checks.py for this sort order.

Use single blank line as separator between entries everywhere.

Change-Id: I2ff09483191260a9ae5d3460046b50d212ceb1ef
2015-10-18 18:54:28 +02:00
Ian Wienand
b472603903 Check indenting of jenkins/jobs/projects.yaml
I just noticed when reviewing the file that a couple of indents were
off.  This isn't major, but we can catch that pretty easily with the
existing jenkins-projects-checks.py.

Change-Id: I92ffda01a2e766954c18fe795862186863f8182f
2015-07-17 12:10:39 +10:00
YAMAMOTO Takashi
ec225a6c84 Use a canonical way to specify python
Be consistent with other scripts in the same directory.

This also improves portability as less hardcoded full path of
python interpreter.

Change-Id: I605710035de2c7c85b5996238af18b3c6b0955ef
2015-01-27 14:57:14 +09:00
Clark Boylan
88a5492951 Better name checking in jenkins project checks
Previously the check for ' name: ' was too relaxed and could match lines
that validly set a value for a macro. Make the check for 'name:' much
more restrictive to only match top level names in projects. This was you
can have macros that accept overridden name values without running into
trouble with alphabetization.

Change-Id: I16299f53433cdd1378ae6665399e3deb8a68d381
2015-01-16 15:23:25 -08:00
Andreas Jaeger
9836ea5357 Add check for ordering of jenkins/jobs/projects.yaml
Example output of test:
$ tools/jenkins-projects-checks.py
Checking section 'OpenStack server projects'
Checking section 'OpenStack client projects'
Checking section 'oslo libraries'
Checking section 'Other OpenStack projects'
  Wrong alphabetical order: tempest, qa-specs
Checking section 'OpenStack API projects'
Checking section 'OpenStack documentation projects'
Checking section 'OpenStack development projects'
Checking section 'OpenStack infrastructure projects'
Checking section 'Stackforge projects'
Found errors in jenkins/jobs/projects.yaml!

This patch fixes the order so that it passes.
It also creates a new job to test this.

Change-Id: I36fd522261363494f07b57e40f0d9b943cf08841
2014-10-06 22:17:26 +02:00