169 Commits

Author SHA1 Message Date
Ian Wienand
101c43dbd3 Add notes on devuser when building images
Add notes on using devuser to create a local user when building test
images.

Change-Id: I9893cd949dd20f5c9fc93bf35b28de2cbac8b4bb
2017-03-10 13:50:41 +11:00
Ian Wienand
ce0a039508 openstack-repos: fail on missing project list
If you specify a CUSTOM_PROJECTS_LIST_URL that doesn't exist you get a
message but the script continues.  Since you clearly meant to specify
something we should bail so the user can correct the problem.

Additionally, add some documentation to the build-image.sh script to
describe how to use this to cut down build times considerably for
initial testing purposes.

Change-Id: I02d1cd341f793471b1ad4374e98031ea53db7f49
2017-03-01 17:17:56 +11:00
Ian Wienand
1418d48f82 Detect misaligned ':' in zuul/layout.yaml
This came up in I79ced2532d03701f50afc9d2a6e4a6e533e8228a.  I don't
think it's actually a problem as the value is stripped.  Certainly the
zuul config-parser doesn't trip up on it.  So it's just for
consistency.

This found the entries fixed up in in zuul/layout.yaml

Change-Id: I76abb096426e24683fe8316c2f8e2d7a796dd96e
2017-02-28 10:33:14 +11:00
jeckxie
218eb38da9 Add Apache 2.0 license to source file
As per OpenStack licensing guide lines [1]:
[H102 H103] Newly contributed Source Code should be licensed under
the Apache 2.0 license.
[H104] Files with no code shouldn't contain any license header nor
comments, and must be left completely empty.

[1] http://docs.openstack.org/developer/hacking/#openstack-licensing

Change-Id: Iabfc781800f080b8235a2d812d16bdb3ee57067a
2017-02-16 10:46:54 +00:00
Ian Wienand
e5aa03b98a Use DIB_GRUB_TIMEOUT to set boot timeout
We currently re-run all the grub setup in 99-fix-grub-timeout which
shouldn't really be necessary (actually a little problematic; although
this is dib's fault, see Ibaaa81124098f3c6febe48e455d3e1cd0a5f1761)

Use the new timeout flag to set this in the bootloader element
directly.

I think it is also an advantage that if you build a testing image with
./tools/build_image.sh this is configurable now ... having to fiddle
the bootloader for debugging is something that happens more than you'd
like.

This is supported since dib 1.26.0

Change-Id: Iafc660a9a8c072af6bf1fd5e51c419abccef4d54
2016-12-22 14:15:04 +11:00
Pranav Salunke
73afc4ef2a Delete files for proper cleanup after tests
Change-Id: I45395a062d0d329bd710b0c5ac7e5d352dacc895
2016-12-19 17:20:43 +01:00
Ian Wienand
4d2b556c33 Update tools/build-image.sh with some useful options
Mainly I always forget to set the nameservers; the corporate firewall
disallows outbound DNS queries so this breaks image build after the
values are written into /etc/resolv.conf

Update with a few other options & clarifications too.  All should be
self-explanatory.

Change-Id: I359f10f2d80cbc8997580870cf3de88903c5f507
2016-12-16 14:33:19 +11:00
Andreas Jaeger
676fb1d6f3 Remove gerritbot limit test
gerritbot can now handle more than 120 channels, remove the test for it.

Change-Id: If6d1630581762aab93c979ba7852f845bc2846f5
Depends-On: Ifafeed77e640bc7b5910251c619358a8a2bd78a6
2016-12-01 19:47:50 +01:00
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
6c0aacfd46 Add small message to explain check-channels-yaml.sh
Add echo to explain what this test does.

Change-Id: I7c43c287125e70b7dc89deeed22bf6a9208b4c54
2016-10-18 22:43:43 +02:00
John L. Villalovos
2b5479e412 Fail build-image if public key is not present
User must have a public key setup for build-image.sh to succeed. Fail
early if it is missing.

Change-Id: Ib02cf3d4101fa93fc8ee234650658176d390b611
2016-10-14 14:25:24 -07: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
Jenkins
f6d08ffa64 Merge "Enable layout-checks.py again" 2016-09-28 16:12:20 +00:00
Jenkins
6cfb4dd7e6 Merge "Stop running compare-xml jobs" 2016-09-28 16:12:05 +00:00
Jenkins
b0274dc63d Merge "Add JJB AFS module" 2016-09-28 16:09:58 +00:00
Andreas Jaeger
1cf95e591a Enable layout-checks.py again
Add check back to tox.ini and fix the location of the job-list file.

Change-Id: I9a92663e3f69313adc95cf6a63c04291ab983460
2016-09-28 08:39:06 +02:00
James E. Blair
4bf14ffdf5 Stop running compare-xml jobs
This removes the compare-xml jobs from both the project-config
and the jenkins-job-builder projects.  The JJB configuration in
project-config is beginning to include custom JJB components
which are supported only in Zuul v2.5.

For the project-config directory, we install a custom JJB module
to support these extensions and run JJB to validate that we have
a good configuration.

It would be possible to do the same for changes to JJB, but
considering that we are beginning to use custom components while
pinning to a released version of JJB (rather than master), it
seems like the project-config corpus of jobs may be less relevant
now, so perhaps now is a good time to stop.

Change-Id: I7c96b866663ce497b566a20f55c4c715b13c3723
2016-09-27 14:49:13 -07:00
James E. Blair
a9c6b6f020 Add JJB AFS module
This adds a JJB module that validates the parameters we use for
the afs publisher.  This publisher is not an actual Jenkins
publisher and only exists in Zuul v2.5's ansible launcher.  Thus,
it has no XML output and is defined locally in this repo.

This also removes the run-layout script (which used to clone HEAD
of both jjb and zuul) in favor of installing these dependencies
via pip in the tox testenv.  We are no longer tracking JJB master,
so pinning to the version of JJB we are using makes more sense.

Similary, it is not expected that we will need cutting edge
versions of zuul for this test in the immediate future (we may
want to revisit this when we approach zuulv3).

Change-Id: I4acd70c868cb6965d39f968b7582257b4ab21778
2016-09-27 14:49:09 -07:00
Andreas Jaeger
f2c6295f25 Check changed track-upstreams in gerrit/projects.yaml
Check changes to the upstream URL for a repo that has option
track-upstream. The check currently is just cloning of the repository.

Since we currently have over 580 repos with track upstream, this check
compares the previous version of the file with the current one and only
tests for changed entries.

Change-Id: Ic716c685512ebe660876388d663314bf3b008b66
2016-09-27 22:05:48 +02:00
K Jonathan Harker
7e427a4ac1 Ensure that gerrit projects have zuul pipelines
Add a layout check to find projects added to gerrit but not zuul, and
vice versa.

We can ignore gerrit projects with a read-only state since they are not
under active development. We can also ignore the z/tempest zuul pipeline
since it is a meta-pipeline not tied to a specific project.

Change-Id: I1da184ecc0268689081c1795b8ee741b41d80d45
2016-09-16 14:23:20 +00:00
Jenkins
5dd4dd54ab Merge "Improve gerrit checks messages" 2016-09-14 07:23:00 +00:00
Andreas Jaeger
5e7ad13490 Improve gerrit checks messages
For tools/check_valid_gerrit_projects.py:
* Improve one error message to mention the project as well.

For tools/check_valid_gerrit_config.sh:
* Remove output for each ACL we check, we output the entry if it's
  wrong. But with 800+ ACL lines, we should not output 800+ lines of
  progress and thus make it hard to find the one failing line.

Change-Id: I4434c0f0bf65a1eb69889a2362c1abae7119fdd7
2016-09-13 13:57:48 +02:00
Jenkins
ba7325a805 Merge "Fixes python 3 syntax issues with missing parentheses in call to 'print'" 2016-09-12 08:23:01 +00:00
Andreas Jaeger
e76d3c36dd Cleanup gerrit/projects.yaml
Remove redundant group entries and add a check so that they cannot get
in again.

Remove some unneeded quotation signs in descriptions.

This is just a cleanup, it should not have any functional differences in
projects.yaml itself.

Change-Id: I49ff9438ab43612704ab61ff84d16c4432f0bc2a
2016-09-10 09:49:29 +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
Andreas Jaeger
4a0a4bb766 Give better error description in check_valid_gerrit_projects.py
This error message was confusing, make it clearer.

Change-Id: Ia930483a8b36f75610a5de711b22b553410d5ff8
2016-09-07 14:40:42 +02:00
Mathieu Gagné
862bd57be4 Check for jobs without attributes in Zuul layout.yaml
This check ensures jobs are not defined without attributes in the jobs
section of Zuul layout.yaml

Change-Id: Id81d2272b0a0c4546197e2ab0f992f46a259de77
2016-08-30 17:30:04 -04: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
Clark Boylan
c0fd48390f Update build-image.sh to reflect nodepool config
We have added and moved elements around and that needs to be reflected
in tools/build-image.sh so that local image builds result in functional
images.

Change-Id: Iaba5eac8ff65b10d608c7d5aa84f083ee00a8319
2016-07-11 12:34:20 -07:00
Andreas Jaeger
4e9f7cf97e Gerrit ACLs: Check for valid keys
Add check for valid keys to find obvious typos in keys.

Fix the one error found in openstack.config.

Change-Id: I6a2af22db0b9425372e66dca93498a33a07275e9
2016-07-07 19:16:47 +00:00
Andreas Jaeger
3968468468 Consistent ERROR messages
Capitalize ERROR for all project-config specific tests, so
that errors can found easily.

Add missing ERROR marks.

Change-Id: I1d7e1077de62945647e0329462016a34eaabd83e
2016-06-30 13:16:10 +02:00
Andreas Jaeger
65a096a964 Check number of channels for gerritbot
We currently have a limit of 120 channels, do not allow more channels to
be set up.

Change-Id: If70f1775b2d07d9af52c83a9d234c08ac73925ce
2016-06-20 19:12:21 +02:00
Jenkins
a6c8ca5df0 Merge "Remove node-devstack from nodepool" 2016-06-17 17:38:32 +00: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
Paul Belanger
536cec4fec
Skip upstream check if we have already imported upstream
Update our testing to only check upstream if we haven't imported the
repo into openstack.  This will address test failues when users
deleted the upstream repo before removing it from
gerrit/projects.yaml.

Change-Id: I6bd9fe9841dee8be352ed17af44b4cf9cea397fd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-06-08 11:26:20 -04:00
Matthew Thode
710a9b49c1
Remove node-devstack from nodepool
Here we fully remove node-devstack from nodepool.  I've changed
refrences to it to be cache-devstack as that is the only function the
now defunct node-devstack element was providing.  I did not do this to
openstack-repos as it has already moved to the prepare-node element.

Change-Id: I1dacd9e1af5ebb6056998f6f2705317eddc87714
Signed-off-by: Matthew Thode <mthode@mthode.org>
2016-05-26 12:51:22 -05:00
Andreas Jaeger
2a6bf90fbc Block stable/feature branch for new project imports
When importing projects, check that they do not contain a simple
"stable" branch as that will block creation of "stable/RELEASE" branches
like "stable/mitaka".
Similar for "feature".

Change-Id: Ia190fdbddf9029149b54e686aa0e82fe040b6733
2016-04-21 17:00:39 +02:00
Jenkins
eedeb8d0d0 Merge "Revert "Add script to facilitate project renaming in project-config repo"" 2016-04-20 08:38:46 +00:00
K Jonathan Harker
ced395e7ce Add a few more layout checks
Create three new checks for zuul/layout.yaml:
* Ensure every project has a check job
* Ensure every project has a gate job
* Ensure that no check or gate pipeline mixes noop jobs with real jobs

vinz-webclient did not have any gate jobs defined, so add noop to its
gate pipeline.

Change-Id: I5935cfbb0e99270af22ca144382b35f6a1b08fee
2016-04-15 09:21:36 -07:00
Andreas Jaeger
6ef07db860 Add checks for gerrit ACLs
Check the following common problems with gerrit ACL lines:
* Wrong path
* Non-existence of a referenced file
* Redundant setting of acl-config with default value

Remove redundant entries that the script found.
Add acl-config for freezer-specs since no ACL existed.
Add acl-config for vinz-webclient since no ACL existed,
this was in original change I1706332f911ad9c8887d1e40613b06cbeb5e1143.

Change-Id: I6b9fc6d2ff1cd5a1f871975608947d6fe763b500
2016-04-11 16:52:26 +02:00
Jim Rollenhagen
26641b6561 Update build-image.sh for new images, add EXTRA_ELEMENTS
This changes the base element for build-image.sh to ubuntu-minimal, and
adds the simple-init element, to make this match the images used in the
gate.

It also adds an EXTRA_ELEMENTS environment variable that users can use
to add elements to the image. For example, local-config is useful to put
the current user's ssh keys in the image.

Last, it documents the things I needed to install to get it to run
correctly on Ubuntu; this is likely not an exhaustive list.

Change-Id: I2506c6722b77bb2f861d08e7a6da453dc2bbbfc2
2016-03-28 16:19:59 -07:00
Andreas Jaeger
d91225a30a Revert "Add script to facilitate project renaming in project-config repo"
The mass rename is done, we do not need these anymore in our repository, remove it again.

This reverts commit 246bbfe03bb5a04ee904e9d09f199dab615fd244.

Change-Id: I5caeabdde4988a987d3fd828605bf5cb73b1aefa
2016-03-28 21:56:24 +02:00
Andreas Jaeger
3498848692 Report number of changed jobs
Check how many jobs have been changed and report that number.
Do not abort if the diff or grep fails to find anything.

Change-Id: I7f655f65cbe4d5cd084af2bda645ba57697ba3be
2016-03-11 18:56:25 +01:00
Jenkins
d003569acd Merge "Unshadow All-Projects in exclusiveGroupPermissions" 2016-02-19 15:10:05 +00:00
Jenkins
a32acadfdc Merge "Keep Gerrit ACL lines deduplicated" 2016-02-18 23:12:03 +00:00
Jeremy Stanley
f62e441f24 Unshadow All-Projects in exclusiveGroupPermissions
Whenever a project-specific ACL declares exclusiveGroupPermissions
on some permission, it can block other valid uses of that permission
which would otherwise be inherited from the All-Projects pseudoACL.
Make sure that Project Bootstrappers retains access to abandon,
-2..+2 on label-Code-Review and -1..+1 on label-Workflow. Also make
sure Change Owners can still abandon and add -1..0 on
label-Workflow, and that Registered Users can always -1..+1 on
label-Code-Review.

This change corrects existing ACLs to meet the above criteria, and
also introduces a normalization rule to prevent regression.

Change-Id: I2eecb7028bcab7d5d82ad4155a775a9b2daa441f
2016-02-17 22:39:03 +00:00
Jeremy Stanley
cb63263510 Keep Gerrit ACL lines deduplicated
Gerrit ACLs can have multiple duplicate option keys in a section,
but completely duplicate lines (key and value together) have no use
so make sure they're collapsed into at most 1 copy.

Change-Id: I6bf43e860dcc8c3d7b2846d4e058b6c8ac7243eb
2016-02-17 22:31:54 +00:00
Andreas Jaeger
03d0680e41 Check for astra misspelling
Add common missspellings, fix also the one issue it caught.

Change-Id: Iaa6a94e3f1e3bff5f4d2986c4926078bd9090b42
2016-02-11 16:51:14 +01:00