Change SKPs to new asset management format
authorborenet <borenet@chromium.org>
Fri, 22 Jul 2016 15:31:07 +0000 (08:31 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 22 Jul 2016 15:31:07 +0000 (08:31 -0700)
BUG=skia:5427
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2169653003
DOCS_PREVIEW= https://skia.org/?cl=2169653003

Review-Url: https://codereview.chromium.org/2169653003

SKP_VERSION [deleted file]
bin/fetch-skps
infra/bots/assets/skp/VERSION [new file with mode: 0644]
infra/bots/assets/skp/create.py
infra/bots/perf_skia.isolate
infra/bots/skps.isolate [deleted file]
infra/bots/test_skia.isolate
site/dev/testing/skps.md

diff --git a/SKP_VERSION b/SKP_VERSION
deleted file mode 100644 (file)
index 3e90fdd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-833
\ No newline at end of file
index bac8e20..19f46e3 100755 (executable)
@@ -5,23 +5,5 @@
 set -x
 set -e
 
-VERSION=`cat $(dirname $0)/../SKP_VERSION`
-if ! gsutil -m cp -r gs://chromium-skia-gm/playback_$VERSION/skps . ; then
-    cat >&2 <<EOF
-
-    Instructions for authenticating.
-
-    Install the utilities you need:
-      curl https://sdk.cloud.google.com | bash
-
-    Authenticate
-      gcloud auth login
-
-    Follow instructions on web page.
-
-    Set Project
-      gcloud config set project google.com:skia-buildbots
-
-EOF
-exit 1
-fi
+DOWNLOAD_SCRIPT=$(cd $(dirname $0)/..; pwd)/infra/bots/assets/skp/download.py
+python ${DOWNLOAD_SCRIPT} -t $(pwd)/skps
diff --git a/infra/bots/assets/skp/VERSION b/infra/bots/assets/skp/VERSION
new file mode 100644 (file)
index 0000000..56a6051
--- /dev/null
@@ -0,0 +1 @@
+1
\ No newline at end of file
index 68df7f0..6bf716c 100755 (executable)
@@ -20,7 +20,8 @@ import utils
 SKIA_TOOLS = os.path.join(common.INFRA_BOTS_DIR, os.pardir, os.pardir, 'tools')
 
 
-def create_asset(chrome_src_path, browser_executable, target_dir):
+def create_asset(chrome_src_path, browser_executable, target_dir,
+                 upload_to_partner_bucket):
   """Create the asset."""
   browser_executable = os.path.realpath(browser_executable)
   chrome_src_path = os.path.realpath(chrome_src_path)
@@ -47,6 +48,8 @@ def create_asset(chrome_src_path, browser_executable, target_dir):
       '--output_dir', os.getcwd(),
       '--chrome_src_path', chrome_src_path,
     ]
+    if upload_to_partner_bucket:
+      webpages_playback_cmd.append('--upload_to_partner_bucket')
     try:
       subprocess.check_call(webpages_playback_cmd)
     finally:
@@ -75,8 +78,10 @@ def main():
   parser.add_argument('--target_dir', '-t', required=True)
   parser.add_argument('--chrome_src_path', '-c', required=True)
   parser.add_argument('--browser_executable', '-e', required=True)
+  parser.add_argument('--upload_to_partner_bucket', action='store_true')
   args = parser.parse_args()
-  create_asset(args.chrome_src_path, args.browser_executable, args.target_dir)
+  create_asset(args.chrome_src_path, args.browser_executable, args.target_dir,
+               args.upload_to_partner_bucket)
 
 
 if __name__ == '__main__':
index 8e38791..e43e843 100644 (file)
@@ -4,6 +4,10 @@
     'infrabots.isolate',
     'ios_bin.isolate',
     'resources.isolate',
-    'skps.isolate',
   ],
+  'variables': {
+    'files': [
+      '../../../.gclient',
+    ],
+  },
 }
diff --git a/infra/bots/skps.isolate b/infra/bots/skps.isolate
deleted file mode 100644 (file)
index 84e986f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  'variables': {
-    'files': [
-      '../../../skps/',
-      '../../../tmp/SKP_VERSION',
-    ],
-  },
-}
index 8e38791..e43e843 100644 (file)
@@ -4,6 +4,10 @@
     'infrabots.isolate',
     'ios_bin.isolate',
     'resources.isolate',
-    'skps.isolate',
   ],
+  'variables': {
+    'files': [
+      '../../../.gclient',
+    ],
+  },
 }
index 63afb67..716f1c6 100644 (file)
@@ -31,16 +31,11 @@ How to download SKPs
 
 The following will work only if you have a google.com account.
 
-All buildbot SKP files created by the RecreateSKPs bot are available in the Google Storage bucket gs://chromium-skia-gm, they can be copied over to your local directory like this:
+All buildbot SKP files created by the RecreateSKPs bot are available via the asset management scripts:
 
-* Download the gsutil tool https://developers.google.com/cloud/sdk/#Quick_Start.
-* Authenticate using your google.com credentials “gcloud auth login”
-* Get the current SKP version from https://skia.googlesource.com/skia/+/master/SKP_VERSION.
-* Run in your terminal:
-
-    $ SKP\_VERSION=...<br/>
-    $ SKP\_DEST=...<br/>
-    $ gsutil -m cp gs://chromium-skia-gm/playback\_${SKP\_VERSION}/skps/*.skp ${SKP\_DEST}
+    $ download_from_google_storage -s infra/bots/tools/luci-go/${PLATFORM}/cipd.sha1 --bucket chromium-luci
+    $ infra/bots/tools/luci-go/${PLATFORM}/cipd auth-login
+    $ infra/bots/assets/skp/download.py -t ${TARGET_DIR}
 
 
 <a name="buildbot_skps_partners"></a>