8f09841693
Switch to using entry points for loading modules as well as individual buliders, triggers, publishers, etc. Remove most openstack-specific python code. Change templating so it's less repetitive -- a single project definition will suffice for multiple jobs or job-groups. This outputs XML that is identical to the current production XML, warts and all. There are significant improvements that can be made to the YAML in a separate change, as they will cause minor changes to existing jobs (adding timestamps, logrotate, etc.). These are mostly marked with TODO in this change. Change-Id: Idcfddb3b43b6cfef4b20919a84540706d7a0a0b1 Reviewed-on: https://review.openstack.org/11000 Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
28 lines
949 B
Bash
Executable File
28 lines
949 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# A simple script to verify that the XML output is unaltered after a change.
|
|
# 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/ example
|
|
else
|
|
rm -f /tmp/jenkins_jobs_test/test/*
|
|
jenkins-jobs test -o /tmp/jenkins_jobs_test/test/ example
|
|
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
|