Merge lp:~abentley/juju-ci-tools/s3-download into lp:juju-ci-tools

Proposed by Aaron Bentley on 2015-07-10
Status: Merged
Merged at revision: 1017
Proposed branch: lp:~abentley/juju-ci-tools/s3-download
Merge into: lp:juju-ci-tools
Diff against target: 53 lines (+17/-10)
2 files modified
run-osx-client-remote.bash (+6/-9)
run-osx-client.bash (+11/-1)
To merge this branch: bzr merge lp:~abentley/juju-ci-tools/s3-download
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code 2015-07-10 Approve on 2015-07-10
Review via email: mp+264450@code.launchpad.net

Commit Message

Download mac os tarball from S3.

Description of the Change

This branch tweaks run-osx-client* to use s3 as the source for the initial tarball.

It moves download responsibility to run-os-client.bash, because the target machine doesn't have s3cmd installed.

It changes the base environment to testing-osx-client-base and the temporary environment to testing-osx-client1 to avoid conflicts with other jobs that might use the testing-osx-client environment.

It stops running setup-workspace because that will delete the uploaded files. With "jujuci.py get" already gone, there's no need to source juju-qa.jujuci.

Similarly, JUJU_HOME was not used, and was not exported, so it wasn't needed.

To post a comment you must log in.
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'run-osx-client-remote.bash'
2--- run-osx-client-remote.bash 2015-07-09 19:38:56 +0000
3+++ run-osx-client-remote.bash 2015-07-10 19:14:19 +0000
4@@ -2,16 +2,13 @@
5 set -eu
6 export PATH=$HOME/juju-ci-tools:$PATH
7 WORKSPACE=$(pwd)
8-JUJU_HOME=$HOME/.juju
9+TARFILE=$1
10 source $HOME/.bashrc
11-source $HOME/cloud-city/juju-qa.jujuci
12 set -x
13
14-jujuci.py setup-workspace --clean-env testing-osx-client $WORKSPACE
15-~/Bin/juju destroy-environment --force -y testing-osx-client || true
16-TARFILE=$(jujuci.py get build-osx-client 'juju-*-osx.tar.gz' ./)
17-echo "Downloaded $TARFILE"
18-tar -xf ./$TARFILE -C $WORKSPACE
19-
20-deploy_job.py testing-osx-client artifacts testing-osx-client \
21+env=testing-osx-client1
22+~/Bin/juju destroy-environment --force -y $env || true
23+tar -xf $TARFILE -C $WORKSPACE
24+mkdir artifacts
25+deploy_job.py testing-osx-client-base artifacts $env \
26 --new-juju-bin $WORKSPACE/juju-bin
27
28=== modified file 'run-osx-client.bash'
29--- run-osx-client.bash 2015-07-09 20:58:51 +0000
30+++ run-osx-client.bash 2015-07-10 19:14:19 +0000
31@@ -16,11 +16,21 @@
32
33 set -x
34 $SCRIPTS/jujuci.py get-build-vars --summary $revision_build
35+if [ -d built ]; then
36+ rm -R built
37+fi
38+mkdir built
39+s3cmd -c $JUJU_HOME/juju-qa.s3cfg sync \
40+ s3://juju-qa-data/juju-ci/products/version-$revision_build/build-osx-client/\
41+ built --exclude '*' --include 'juju-*-osx.tar.gz'
42+TARFILE=$(find built -name 'juju-*-osx.tar.gz')
43+echo "Downloaded $TARFILE"
44
45 cat > temp-config.yaml <<EOT
46 install:
47 remote:
48 - $SCRIPTS/run-osx-client-remote.bash
49-command: [remote/run-osx-client-remote.bash]
50+ - "$TARFILE"
51+command: [remote/run-osx-client-remote.bash, "remote/$(basename $TARFILE)"]
52 EOT
53 workspace-run temp-config.yaml $USER_AT_HOST

Subscribers

People subscribed via source and target branches