3
3
: ${SCRIPTS=$(readlink -f $(dirname $0))}
4
new_juju=$(find $new_juju_dir -name juju)
4
5
old_stable_juju=$(find $old_stable_juju_dir -name juju)
6
7
export JUJU_HOME=$HOME/cloud-city
7
8
build_id=${JOB_NAME}-${BUILD_NUMBER}
8
9
s3cfg=$JUJU_HOME/juju-qa.s3cfg
9
10
s3base=s3://juju-qa-data/industrial-test/${build_id}
10
if [ "${new_agent_url-}" != "" ]; then
11
if [ "$new_agent_url" != "" ]; then
11
12
extra_args="--new-agent-url $new_agent_url"
16
17
# Delete all files in $WORKSPACE, but no error if empty.
17
find $WORKSPACE -mindepth 1 -delete
18
if [ "${revision_build-}" != "" ]; then
19
extra_args="$extra_args --agent-stream revision-build-$revision_build"
20
new_juju=$($SCRIPTS/s3ci.py get-juju-bin $revision_build $WORKSPACE)
21
$SCRIPTS/s3ci.py get $revision_build build-revision buildvars.json $WORKSPACE
22
buildvars=$WORKSPACE/buildvars.json
24
new_juju=$(find $new_juju_dir -name juju)
25
buildvars=$new_juju_dir/buildvars.json
27
if [ "${both_new-}" == "true" ]; then
28
export PATH=$(dirname $new_juju):$PATH
32
$SCRIPTS/write_industrial_test_metadata.py $buildvars $environment \
18
find $WORKSPACE -type f -delete
19
$SCRIPTS/write_industrial_test_metadata.py $new_juju_dir/buildvars.json \
20
$environment metadata.json
34
21
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json
35
timeout -sINT -k 10m 2d $SCRIPTS/industrial_test.py $environment $new_juju \
36
--old-stable $old_stable_juju $suite $logs --attempts $attempts \
22
timeout -sINT -k 10m 1d $SCRIPTS/industrial_test.py $environment $new_juju \
23
--old-stable $old_stable_juju $suite --attempts $attempts \
37
24
--json-file results.json $extra_args
38
25
s3cmd -c $s3cfg put results.json $s3base-results.json