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
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)
'--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:
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__':
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>