b60770597a
The openstack/openstack-ci-puppet repo moved and became openstack-infra/config. Remove references to openstack-ci-puppet and replace them with references to openstack-infra/config. Change-Id: I75e7797995b894b6053901dbcfa351404048ea7c Reviewed-on: https://review.openstack.org/23227 Reviewed-by: Khai Do <zaro0508@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# A simple script to verify that the XML output is unaltered after a change.
|
|
|
|
# First, symlink "config" to the directory containing your config files
|
|
# (eg openstack-infra/config/modules/openstack_project/files/jenkins_job_builder/config)
|
|
|
|
# Before you start work, run "./test.sh save".
|
|
# As you test your change, run "./test.sh" to see differences in XML output.
|
|
|
|
mkdir -p /tmp/jenkins_jobs_test/saved
|
|
mkdir -p /tmp/jenkins_jobs_test/test
|
|
|
|
if [ "$1" == "save" ]
|
|
then
|
|
rm -f /tmp/jenkins_jobs_test/saved/*
|
|
jenkins-jobs test -o /tmp/jenkins_jobs_test/saved/ config
|
|
else
|
|
rm -f /tmp/jenkins_jobs_test/test/*
|
|
jenkins-jobs test -o /tmp/jenkins_jobs_test/test/ config
|
|
for x in `(cd /tmp/jenkins_jobs_test/saved && find -type f)`
|
|
do
|
|
if ! diff -u /tmp/jenkins_jobs_test/saved/$x /tmp/jenkins_jobs_test/test/$x >/dev/null 2>&1
|
|
then
|
|
echo "============================================================"
|
|
echo $x
|
|
echo "------------------------------------------------------------"
|
|
fi
|
|
diff -u /tmp/jenkins_jobs_test/saved/$x /tmp/jenkins_jobs_test/test/$x
|
|
done
|
|
fi
|