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: publishers:
- console-log - console-log
- upload-sphinx-draft - 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 voting: false
- name: gate-climate-devstack-dsvm - name: gate-climate-devstack-dsvm
voting: false voting: false
- name: check-projects-yaml-alphabetized
voting: false
# puppet-openstack targets # puppet-openstack targets
- name: gate-puppet-vswitch-puppet-lint - name: gate-puppet-vswitch-puppet-lint
voting: false voting: false
@ -546,11 +548,13 @@ projects:
- gate-config-puppet-lint - gate-config-puppet-lint
- gate-config-puppet-syntax - gate-config-puppet-syntax
- gate-ci-docs - gate-ci-docs
- check-projects-yaml-alphabetized
gate: gate:
- gate-config-layout - gate-config-layout
- gate-config-pep8 - gate-config-pep8
- gate-config-puppet-lint - gate-config-puppet-lint
- gate-config-puppet-syntax - gate-config-puppet-syntax
- check-projects-yaml-alphabetized
post: post:
- ci-docs - ci-docs