diff options
author | James E. Blair <jeblair@hp.com> | 2012-09-11 00:53:26 +0200 |
---|---|---|
committer | Jenkins <jenkins@review.openstack.org> | 2012-09-17 20:25:38 +0000 |
commit | ab7c6bc6c12a63b898f7cc0d18bd26ae8842d0b4 (patch) | |
tree | df45dd661dbc8039a4377dbf376bef2056a9edf1 /tools | |
parent | 32128b37f9f56cc3a4766d2c71f95ebfa18910d3 (diff) | |
download | python-jenkins-job-builder-ab7c6bc6c12a63b898f7cc0d18bd26ae8842d0b4.tar.gz python-jenkins-job-builder-ab7c6bc6c12a63b898f7cc0d18bd26ae8842d0b4.tar.xz python-jenkins-job-builder-ab7c6bc6c12a63b898f7cc0d18bd26ae8842d0b4.zip |
Add documentation.
Move test.sh to the tools directory.
Move parameters and notifications to their own modules; even
though they are implemented as Jenkins properties, they make
more sense as separate entities in the job builder, because
that's they way they are specified in the YAML. All three
modules that touch the properties xml object know how to
create it if it's missing.
Change-Id: I4b42ff10a93fd3ed98f632b58e47f3e0e45086d6
Reviewed-on: https://review.openstack.org/12741
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Diffstat (limited to 'tools')
-rw-r--r-- | tools/test-requires | 1 | ||||
-rwxr-xr-x | tools/test.sh | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tools/test-requires b/tools/test-requires new file mode 100644 index 00000000..6966869c --- /dev/null +++ b/tools/test-requires @@ -0,0 +1 @@ +sphinx diff --git a/tools/test.sh b/tools/test.sh new file mode 100755 index 00000000..ddb6bc82 --- /dev/null +++ b/tools/test.sh @@ -0,0 +1,31 @@ +#!/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-ci-puppet/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 |