Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: scripts/slave/skia/upload_skps.py

Issue 2167883004: [Skia] Convert SKPs to a CIPD package (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Fix boto env, ensure tmp_dir exists since it's no longer isolated Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Create a CL to update the SKP version.""" 5 """Create a CL to update the SKP version."""
6 6
7 7
8 import argparse 8 import argparse
9 import os 9 import os
10 import subprocess 10 import subprocess
(...skipping 11 matching lines...) Expand all
22 Automatic commit by the RecreateSKPs bot. 22 Automatic commit by the RecreateSKPs bot.
23 23
24 TBR= 24 TBR=
25 NO_MERGE_BUILDS 25 NO_MERGE_BUILDS
26 ''' 26 '''
27 SKIA_COMMITTER_EMAIL = 'skia.buildbots@gmail.com' 27 SKIA_COMMITTER_EMAIL = 'skia.buildbots@gmail.com'
28 SKIA_COMMITTER_NAME = 'skia.buildbots' 28 SKIA_COMMITTER_NAME = 'skia.buildbots'
29 SKIA_REPO = 'https://skia.googlesource.com/skia.git' 29 SKIA_REPO = 'https://skia.googlesource.com/skia.git'
30 30
31 31
32 def main(chrome_src_path, browser_executable, dry_run=False): 32 def main(target_dir):
33 if dry_run:
34 print 'Not committing results since --dry-run was provided'
35
36 subprocess.check_call(['git', 'config', '--local', 'user.name', 33 subprocess.check_call(['git', 'config', '--local', 'user.name',
37 SKIA_COMMITTER_NAME]) 34 SKIA_COMMITTER_NAME])
38 subprocess.check_call(['git', 'config', '--local', 'user.email', 35 subprocess.check_call(['git', 'config', '--local', 'user.email',
39 SKIA_COMMITTER_EMAIL]) 36 SKIA_COMMITTER_EMAIL])
40 if CHROMIUM_SKIA in subprocess.check_output(['git', 'remote', '-v']): 37 if CHROMIUM_SKIA in subprocess.check_output(['git', 'remote', '-v']):
41 subprocess.check_call(['git', 'remote', 'set-url', 'origin', SKIA_REPO, 38 subprocess.check_call(['git', 'remote', 'set-url', 'origin', SKIA_REPO,
42 CHROMIUM_SKIA]) 39 CHROMIUM_SKIA])
43 40
41 # Download CIPD.
42 cipd_sha1 = os.path.join(os.getcwd(), 'infra', 'bots', 'tools', 'luci-go',
43 'linux64', 'cipd.sha1')
44 subprocess.check_call(['download_from_google_storage', '-s', cipd_sha1,
45 '--bucket', 'chromium-luci'])
46
44 with git_utils.GitBranch(branch_name='update_skp_version', 47 with git_utils.GitBranch(branch_name='update_skp_version',
45 commit_msg=COMMIT_MSG, 48 commit_msg=COMMIT_MSG,
46 commit_queue=not dry_run): 49 commit_queue=True):
47 subprocess.check_call(['python', os.path.join('tools', 'skp', 50 upload_script = os.path.join(
48 'recreate_skps.py'), 51 os.getcwd(), 'infra', 'bots', 'assets', 'skp', 'upload.py')
49 chrome_src_path, browser_executable, str(dry_run)]) 52 subprocess.check_call(['python', upload_script, '-t', target_dir])
53
54 # TODO(borenet): Upload to partner GS bucket?
rmistry 2016/07/22 14:26:15 Is this not being done? I thought it would be done
borenet 2016/07/22 14:49:53 I removed the flag which caused that to occur in h
50 55
51 56
52 if '__main__' == __name__: 57 if '__main__' == __name__:
53 parser = argparse.ArgumentParser() 58 parser = argparse.ArgumentParser()
54 parser.add_argument("chrome_src_path") 59 parser.add_argument("--target_dir")
55 parser.add_argument("browser_executable")
56 parser.add_argument("--dry-run", action="store_true")
57 args = parser.parse_args() 60 args = parser.parse_args()
58 main(args.chrome_src_path, args.browser_executable, args.dry_run) 61 main(args.target_dir)
OLDNEW
« scripts/slave/recipes/skia/swarm_trigger.py ('K') | « scripts/slave/skia/recreate_skps.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698