Merge "Add job to check projects.yaml alphabetized"

This commit is contained in:
Jenkins 2013-12-16 19:15:43 +00:00 committed by Gerrit Code Review
commit 84bd35da4e
3 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/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
sed -e '/^- project: /!d' -e 's/^- project: //' \
modules/openstack_project/templates/review.projects.yaml.erb \
> projects_list
LC_ALL=C sort projects_list -o projects_list.sorted
diff projects_list projects_list.sorted > projects_list.diff
if [[ -n `cat 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

@ -58,3 +58,16 @@
publishers:
- console-log
- upload-sphinx-draft
- job:
name: check-projects-yaml-alphabetized
node: bare-precise
builders:
- gerrit-git-prep
- shell: |
/usr/local/jenkins/slave_scripts/check_projects_yaml_alphabetized.sh
publishers:
- console-log

View File

@ -338,6 +338,8 @@ jobs:
voting: false
- name: gate-climate-devstack-dsvm
voting: false
- name: check-projects-yaml-alphabetized
voting: false
# puppet-openstack targets
- name: gate-puppet-vswitch-puppet-lint
voting: false
@ -546,11 +548,13 @@ projects:
- gate-config-puppet-lint
- gate-config-puppet-syntax
- gate-ci-docs
- check-projects-yaml-alphabetized
gate:
- gate-config-layout
- gate-config-pep8
- gate-config-puppet-lint
- gate-config-puppet-syntax
- check-projects-yaml-alphabetized
post:
- ci-docs