1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#!/bin/bash
set -eux
usage() {
echo "usage: $0 ADDRESS"
echo " ADDRESS: The IP or DNS address the windows test machine."
echo " --juju-home: The location of cloud-city and staging-juju-rsa."
exit 1
}
while [[ "${1-}" != "" && $1 =~ ^-.* ]]; do
case $1 in
--juju-home)
shift
JUJU_HOME=$(cd $1; pwd)
;;
--help)
usage
;;
esac
shift
done
test $# -eq 1 || usage
HOST="$1"
: ${SCRIPTS=$(readlink -f $(dirname $0))}
export PATH="$SCRIPTS:$PATH"
set -x
scp -i $JUJU_HOME/staging-juju-rsa \
-o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" \
$SCRIPTS/deploy_stack.py $SCRIPTS/jujupy.py $SCRIPTS/jujuconfig.py \
$SCRIPTS/utility.py \
Administrator@$HOST:/cygdrive/c/Users/Administrator/ci/
if [ $? -ne 0 ]; then
exit 1
fi
set +e
ssh -i $JUJU_HOME/staging-juju-rsa \
-o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" \
Administrator@$HOST \
'juju destroy-environment --force -y test-win-client'
ssh -i $JUJU_HOME/staging-juju-rsa \
-o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" \
Administrator@$HOST \
'/cygdrive/c/python27/python \\Users\\Administrator\\ci\\deploy_stack.py' \
test-win-client
EXIT_STATUS=$?
ssh -i $JUJU_HOME/staging-juju-rsa \
-o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" \
Administrator@$HOST \
'juju destroy-environment --force -y test-win-client'
set -e
set +x
exit $EXIT_STATUS
|