Merge "Add job to check projects.yaml alphabetized"
This commit is contained in:
commit
84bd35da4e
27
modules/jenkins/files/slave_scripts/check_projects_yaml_alphabetized.sh
Executable file
27
modules/jenkins/files/slave_scripts/check_projects_yaml_alphabetized.sh
Executable 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
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user