~andrewjbeach/juju-ci-tools/make-local-patcher

767.1.5 by Aaron Bentley
Fix hashbang.
1
#!/bin/bash
767.1.3 by Aaron Bentley
Stop echoing var assignment.
2
set -eu
767.1.2 by Aaron Bentley
Reduce repetition, add hashbang and eux.
3
: ${SCRIPTS=$(readlink -f $(dirname $0))}
767.1.1 by Aaron Bentley
Verbatim copy of run-reliability-test.bash from job.
4
new_juju=$(find $new_juju_dir -name juju)
5
export JUJU_HOME=$HOME/cloud-city
6
build_id=${JOB_NAME}-${BUILD_NUMBER}
767.1.2 by Aaron Bentley
Reduce repetition, add hashbang and eux.
7
s3cfg=$JUJU_HOME/juju-qa.s3cfg
8
s3base=s3://juju-qa-data/industrial-test/${build_id}
767.1.1 by Aaron Bentley
Verbatim copy of run-reliability-test.bash from job.
9
if [ "$new_agent_url" != "" ]; then
10
  extra_args="--new-agent-url $new_agent_url"
11
else
12
  extra_args=""
13
fi
767.1.3 by Aaron Bentley
Stop echoing var assignment.
14
set -x
15
$SCRIPTS/write_industrial_test_metadata.py $new_juju_dir/buildvars.json \
16
  $environment metadata.json
17
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json
767.1.4 by Aaron Bentley
Add timeout to run-reliability-test.
18
timeout -sINT -k 10m 1d $SCRIPTS/industrial_test.py $environment $new_juju \
19
  $suite --attempts $attempts --json-file results.json $extra_args
767.1.2 by Aaron Bentley
Reduce repetition, add hashbang and eux.
20
s3cmd -c $s3cfg put results.json $s3base-results.json