Check that zuul.d/projects.yaml is sorted

As part of linters run, check that zuul.d/projects.yaml is sorted
alphabetically.

Reorder the few projects that are not.

Change-Id: I5ddb8f3ad70c47690534eaba9671a80da5dfd905
This commit is contained in:
Andreas Jaeger 2017-10-22 13:38:55 +02:00
parent a99959d6fa
commit 651b968736
3 changed files with 89 additions and 63 deletions

24
tools/zuul-projects_sorted.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash -xe
# It checks that projects.yaml alphabetized and prints list of projects that
# should be sorted.
export TMPDIR=`/bin/mktemp -d`
trap "rm -rf $TMPDIR" EXIT
pushd $TMPDIR
PROJECTS_LIST=$OLDPWD/zuul.d/projects.yaml
grep name: $PROJECTS_LIST |sed -e 's/^ *name: //' > projects_list
LC_ALL=C sort --ignore-case projects_list -o projects_list.sorted
if ! diff projects_list projects_list.sorted > projects_list.diff; then
echo "The following projects should be alphabetized: "
cat projects_list.diff | grep -e '> '
exit 1
else
echo "Projects alphabetized."
fi
popd

View File

@ -11,6 +11,8 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
commands =
{toxinidir}/tools/run-bashate.sh
flake8
# Check that zuul.d/projects.yaml list is sorted
{toxinidir}/tools/zuul-projects_sorted.sh
[testenv:gerrit]
deps = PyYAML

View File

@ -868,6 +868,12 @@
- openstack-tox-pep8
- openstack-tox-py27
- project:
name: openstack-infra/logstash-filters
templates:
- system-required
- infra-logstash-filter-jobs
- project:
name: openstack-infra/log_processor
templates:
@ -876,12 +882,6 @@
- publish-openstack-sphinx-docs-infra
- publish-to-pypi
- project:
name: openstack-infra/logstash-filters
templates:
- system-required
- infra-logstash-filter-jobs
- project:
name: openstack-infra/lpmqtt
templates:
@ -1282,7 +1282,7 @@
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-elastic_recheck
name: openstack-infra/puppet-elasticsearch
templates:
- system-required
- infra-puppet-check-jobs
@ -1291,7 +1291,7 @@
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-elasticsearch
name: openstack-infra/puppet-elastic_recheck
templates:
- system-required
- infra-puppet-check-jobs
@ -1496,15 +1496,6 @@
- puppet-beaker-jobs
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-log_processor
templates:
- system-required
- infra-puppet-check-jobs
- infra-puppet-apply-jobs
- puppet-beaker-jobs
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-logrotate
templates:
@ -1522,6 +1513,15 @@
- puppet-beaker-jobs
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-log_processor
templates:
- system-required
- infra-puppet-check-jobs
- infra-puppet-apply-jobs
- puppet-beaker-jobs
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-lpmqtt
templates:
@ -1606,30 +1606,6 @@
- puppet-beaker-jobs
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-openstack_health
templates:
- system-required
- infra-puppet-check-jobs
- infra-puppet-apply-jobs
- puppet-beaker-jobs
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-openstack_infra_spec_helper
templates:
- system-required
check:
jobs:
- legacy-puppet-openstack-infra-spec-helper-unit-centos-7
- legacy-puppet-openstack-infra-spec-helper-unit
- legacy-puppet-openstack-infra-spec-helper-unit-ubuntu-trusty
gate:
jobs:
- legacy-puppet-openstack-infra-spec-helper-unit-centos-7
- legacy-puppet-openstack-infra-spec-helper-unit
- legacy-puppet-openstack-infra-spec-helper-unit-ubuntu-trusty
- project:
name: openstack-infra/puppet-openstackci
templates:
@ -1657,6 +1633,30 @@
- puppet-beaker-jobs
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-openstack_health
templates:
- system-required
- infra-puppet-check-jobs
- infra-puppet-apply-jobs
- puppet-beaker-jobs
- puppet-beaker-jobs-xenial
- project:
name: openstack-infra/puppet-openstack_infra_spec_helper
templates:
- system-required
check:
jobs:
- legacy-puppet-openstack-infra-spec-helper-unit-centos-7
- legacy-puppet-openstack-infra-spec-helper-unit
- legacy-puppet-openstack-infra-spec-helper-unit-ubuntu-trusty
gate:
jobs:
- legacy-puppet-openstack-infra-spec-helper-unit-centos-7
- legacy-puppet-openstack-infra-spec-helper-unit
- legacy-puppet-openstack-infra-spec-helper-unit-ubuntu-trusty
- project:
name: openstack-infra/puppet-os_client_config
templates:
@ -5187,13 +5187,6 @@
jobs:
- openstack-tox-py27
- project:
name: openstack/conveyor
templates:
- system-required
- openstack-python-jobs
- check-requirements
- project:
name: openstack/contributor-guide
templates:
@ -5208,6 +5201,13 @@
jobs:
- publish-openstack-contributor-guide
- project:
name: openstack/conveyor
templates:
- system-required
- openstack-python-jobs
- check-requirements
- project:
name: openstack/cookbook-openstack-application-catalog
templates:
@ -23252,7 +23252,7 @@
- openstack-tox-py27
- project:
name: openstack/puppet-openstack_extras
name: openstack/puppet-openstacklib
templates:
- system-required
- puppet-openstack-check-jobs
@ -23267,14 +23267,7 @@
- publish-openstack-python-branch-tarball
- project:
name: openstack/puppet-openstack_spec_helper
templates:
- system-required
- puppet-openstack-libraries-jobs
- release-notes-jobs
- project:
name: openstack/puppet-openstacklib
name: openstack/puppet-openstack_extras
templates:
- system-required
- puppet-openstack-check-jobs
@ -23289,6 +23282,13 @@
jobs:
- publish-openstack-python-branch-tarball
- project:
name: openstack/puppet-openstack_spec_helper
templates:
- system-required
- puppet-openstack-libraries-jobs
- release-notes-jobs
- project:
name: openstack/puppet-oslo
templates:
@ -25486,6 +25486,12 @@
- release-notes-jobs
- publish-to-pypi
- project:
name: openstack/python-tempestconf
templates:
- system-required
- openstack-python-jobs
- project:
name: openstack/python-tricircleclient
templates:
@ -25500,12 +25506,6 @@
- openstack-tox-cover:
voting: false
- project:
name: openstack/python-tempestconf
templates:
- system-required
- openstack-python-jobs
- project:
name: openstack/python-tripleoclient
templates: