| OLD | NEW |
| (Empty) |
| 1 #!/bin/bash | |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 # This script copies all dependencies required for trace collection. | |
| 7 # Usage: | |
| 8 # deploy.sh builddir gcs_path | |
| 9 # | |
| 10 # Where: | |
| 11 # builddir is the build directory for Chrome | |
| 12 # gcs_path is the Google Storage bucket under which the deployment is | |
| 13 # installed | |
| 14 | |
| 15 builddir=$1 | |
| 16 tmpdir=`mktemp -d` | |
| 17 deployment_gcs_path=$2/deployment | |
| 18 | |
| 19 # Extract needed sources. | |
| 20 src_suffix=src | |
| 21 tmp_src_dir=$tmpdir/$src_suffix | |
| 22 | |
| 23 # Copy files from tools/android/loading. | |
| 24 mkdir -p $tmp_src_dir/tools/android/loading | |
| 25 cp tools/android/loading/*.py $tmp_src_dir/tools/android/loading | |
| 26 cp -r tools/android/loading/gce $tmp_src_dir/tools/android/loading | |
| 27 | |
| 28 # Copy other dependencies. | |
| 29 mkdir $tmp_src_dir/third_party | |
| 30 rsync -av --exclude=".*" --exclude "*.pyc" --exclude "*.html" --exclude "*.md" \ | |
| 31 third_party/catapult $tmp_src_dir/third_party | |
| 32 mkdir $tmp_src_dir/tools/perf | |
| 33 cp -r tools/perf/chrome_telemetry_build $tmp_src_dir/tools/perf | |
| 34 mkdir -p $tmp_src_dir/build/android | |
| 35 cp build/android/devil_chromium.py $tmp_src_dir/build/android/ | |
| 36 cp build/android/video_recorder.py $tmp_src_dir/build/android/ | |
| 37 cp build/android/devil_chromium.json $tmp_src_dir/build/android/ | |
| 38 cp -r build/android/pylib $tmp_src_dir/build/android/ | |
| 39 mkdir -p \ | |
| 40 $tmp_src_dir/third_party/WebKit/Source/devtools/front_end/emulated_devices | |
| 41 cp third_party/WebKit/Source/devtools/front_end/emulated_devices/module.json \ | |
| 42 $tmp_src_dir/third_party/WebKit/Source/devtools/front_end/emulated_devices/ | |
| 43 | |
| 44 # Tar up the source and copy it to Google Cloud Storage. | |
| 45 source_tarball=$tmpdir/source.tgz | |
| 46 tar -cvzf $source_tarball -C $tmpdir $src_suffix | |
| 47 gsutil cp $source_tarball gs://$deployment_gcs_path/source/ | |
| 48 | |
| 49 # Copy the chrome executable to Google Cloud Storage. | |
| 50 chrome/tools/build/make_zip.py $builddir chrome/tools/build/linux/FILES.cfg \ | |
| 51 $tmpdir/linux.zip | |
| 52 gsutil cp $tmpdir/linux.zip gs://$deployment_gcs_path/binaries/linux.zip | |
| 53 | |
| 54 # Generate and upload metadata about this deployment. | |
| 55 CHROMIUM_REV=$(git merge-base HEAD origin/master) | |
| 56 cat >$tmpdir/build_metadata.json << EOF | |
| 57 { | |
| 58 "chromium_rev": "$CHROMIUM_REV" | |
| 59 } | |
| 60 EOF | |
| 61 gsutil cp $tmpdir/build_metadata.json \ | |
| 62 gs://$deployment_gcs_path/deployment_metadata.json | |
| 63 rm -rf $tmpdir | |
| OLD | NEW |