816.1.2
by Curtis Hovey
Added script to run osx client test. |
1 |
#!/bin/bash
|
2 |
# This script presumes ~/ci and ~/.juju is setup on the remote machine.
|
|
3 |
set -eu
|
|
4 |
SCRIPTS=$(readlink -f $(dirname $0)) |
|
5 |
JUJU_HOME=${JUJU_HOME:-$(dirname $SCRIPTS)/cloud-city} |
|
6 |
||
7 |
SSH_OPTIONS="-i $JUJU_HOME/staging-juju-rsa \ |
|
8 |
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
|
9 |
||
10 |
||
11 |
usage() { |
|
12 |
echo "usage: $0 user@host" |
|
13 |
echo " user@host: The user and host to ssh to." |
|
14 |
exit 1 |
|
15 |
}
|
|
16 |
||
17 |
||
18 |
test $# -eq 1 || usage |
|
19 |
USER_AT_HOST="$1" |
|
20 |
||
21 |
set -x
|
|
22 |
$SCRIPTS/jujuci.py get build-revision 'buildvars.bash' ./ |
|
23 |
source ./buildvars.bash
|
|
24 |
rev=${REVNO-$(echo $REVISION_ID | head -c8)} |
|
25 |
echo "Testing $BRANCH $rev" |
|
26 |
||
27 |
ssh $SSH_OPTIONS $USER_AT_HOST <<"EOT" |
|
28 |
#!/bin/bash
|
|
849.2.2
by Curtis Hovey
Correct e and x. |
29 |
set -eu
|
849.2.1
by Curtis Hovey
Use jenkins user in osx build and run. Always use authentication when calling jujuci. |
30 |
RELEASE_SCRIPTS=$HOME/juju-release-tools |
31 |
SCRIPTS=$HOME/juju-ci-tools |
|
32 |
WORKSPACE=$HOME/workspace |
|
854
by Curtis Hovey
Set a JUJU_HOME for os x. |
33 |
JUJU_HOME=$HOME/.juju |
855
by Curtis Hovey
Source the os x bashrc which maps linuxisms to os x. |
34 |
source $HOME/.bashrc |
853
by Curtis Hovey
OS X uses a different JUJU_HOME. |
35 |
source $HOME/cloud-city/juju-qa.jujuci |
849.2.2
by Curtis Hovey
Correct e and x. |
36 |
set -x
|
816.1.3
by Curtis Hovey
Do not deploy a full stack to test the osx client. Build and deploy osx using |
37 |
|
38 |
cd $WORKSPACE |
|
838
by Curtis Hovey
Clean the osx client job too. |
39 |
$SCRIPTS/jujuci.py setup-workspace --clean-env testing-osx-client $WORKSPACE |
816.1.3
by Curtis Hovey
Do not deploy a full stack to test the osx client. Build and deploy osx using |
40 |
~/Bin/juju destroy-environment --force -y testing-osx-client || true |
41 |
TARFILE=$($SCRIPTS/jujuci.py get build-osx-client 'juju-*-osx.tar.gz' ./) |
|
42 |
echo "Downloaded $TARFILE" |
|
816.1.4
by Curtis Hovey
Remove testing shim. |
43 |
tar -xf ./$TARFILE -C $WORKSPACE |
816.1.3
by Curtis Hovey
Do not deploy a full stack to test the osx client. Build and deploy osx using |
44 |
|
45 |
export PATH=$WORKSPACE/juju-bin:$PATH |
|
46 |
$SCRIPTS/deploy_stack.py testing-osx-client
|
|
816.1.2
by Curtis Hovey
Added script to run osx client test. |
47 |
EXIT_STATUS=$? |
822
by Curtis Hovey
Pass the -y flag to destroy env. |
48 |
juju destroy-environment -y testing-osx-client || true |
816.1.2
by Curtis Hovey
Added script to run osx client test. |
49 |
exit $EXIT_STATUS |
50 |
EOT |
|
51 |
EXIT_STATUS=$? |
|
52 |
||
53 |
exit $EXIT_STATUS |