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

« back to all changes in this revision

Viewing changes to assemble-parallel-streams.bash

  • Committer: Aaron Bentley
  • Date: 2015-06-15 19:04:10 UTC
  • mfrom: (976.2.4 fix-log-rotation)
  • Revision ID: aaron.bentley@canonical.com-20150615190410-vvhtl7yxn0xbtbiy
Fix error handling in assess_log_rotation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
set -eu
3
 
export JUJU_HOME=${JUJU_HOME:-$HOME/cloud-city}
4
 
source $JUJU_HOME/juju-qa.jujuci
5
 
set -x
6
 
revision_build=$1
7
 
WORKSPACE=$2
8
 
AGENT_JSON=$3
9
 
TESTING=$4
10
 
AGENT_JOBS=$5
11
 
 
12
 
WS_JSON=$WORKSPACE/ws-json
13
 
AGENT_DIRNAME=revision-build-$revision_build
14
 
WS_AGENTS=$WORKSPACE/agent/$AGENT_DIRNAME
15
 
TESTING_AGENTS=$TESTING/agent/$AGENT_DIRNAME
16
 
VERSION=$(jujuci.py get-build-vars $revision_build --version)
17
 
mkdir $WS_JSON
18
 
mkdir -p $WS_AGENTS
19
 
for job in $AGENT_JOBS; do
20
 
  s3ci.py get $revision_build $job '.*\.tgz' $WS_AGENTS
21
 
  s3ci.py get $revision_build $job '.*\.json' $WS_JSON
22
 
done
23
 
set_stream.py $AGENT_JSON/release.json \
24
 
  $WS_JSON/release-$revision_build.json $revision_build
25
 
mkdir -p $TESTING_AGENTS
26
 
cp $WS_AGENTS/* $TESTING_AGENTS
27
 
cp $WS_JSON/*.json $AGENT_JSON/
28
 
json2streams --juju-format $AGENT_JSON/* $TESTING
29
 
sstream-query $TESTING/streams/v1/index2.json \
30
 
  content_id="com.ubuntu.juju:revision-build-$revision_build:tools" \
31
 
  version=$VERSION --output-format="%(sha256)s  %(item_url)s" |sort|uniq > \
32
 
  sha256sums
33
 
sha256sum -c sha256sums