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

Side by Side Diff: infra/bots/upload_skps.py

Issue 2426863003: Fix SKP version in tasks.json, make upload_skps.py update tasks.json (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « infra/bots/tasks.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26 matching lines...) Expand all
37 if CHROMIUM_SKIA in subprocess.check_output(['git', 'remote', '-v']): 37 if CHROMIUM_SKIA in subprocess.check_output(['git', 'remote', '-v']):
38 subprocess.check_call(['git', 'remote', 'set-url', 'origin', SKIA_REPO, 38 subprocess.check_call(['git', 'remote', 'set-url', 'origin', SKIA_REPO,
39 CHROMIUM_SKIA]) 39 CHROMIUM_SKIA])
40 40
41 # Download CIPD. 41 # Download CIPD.
42 cipd_sha1 = os.path.join(os.getcwd(), 'infra', 'bots', 'tools', 'luci-go', 42 cipd_sha1 = os.path.join(os.getcwd(), 'infra', 'bots', 'tools', 'luci-go',
43 'linux64', 'cipd.sha1') 43 'linux64', 'cipd.sha1')
44 subprocess.check_call(['download_from_google_storage', '-s', cipd_sha1, 44 subprocess.check_call(['download_from_google_storage', '-s', cipd_sha1,
45 '--bucket', 'chromium-luci']) 45 '--bucket', 'chromium-luci'])
46 46
47 # First verify that there are no gen_tasks diffs.
48 gen_tasks = os.path.join(os.getcwd(), 'infra', 'bots', 'gen_tasks.go')
49 try:
50 subprocess.check_call(['go', 'run', gen_tasks, '--test'])
51 except subprocess.CalledProcessError as e:
52 print >> sys.stderr, ('gen_tasks.go failed, not uploading SKP update:\n\n%s'
53 % e.output)
54 sys.exit(1)
55
56 # Upload the new version, land the update CL.
47 with git_utils.GitBranch(branch_name='update_skp_version', 57 with git_utils.GitBranch(branch_name='update_skp_version',
48 commit_msg=COMMIT_MSG, 58 commit_msg=COMMIT_MSG,
49 commit_queue=True): 59 commit_queue=True):
50 upload_script = os.path.join( 60 upload_script = os.path.join(
51 os.getcwd(), 'infra', 'bots', 'assets', 'skp', 'upload.py') 61 os.getcwd(), 'infra', 'bots', 'assets', 'skp', 'upload.py')
52 subprocess.check_call(['python', upload_script, '-t', target_dir]) 62 subprocess.check_call(['python', upload_script, '-t', target_dir])
63 subprocess.check_call(['go', 'run', gen_tasks])
64 subprocess.check_call([
65 'git', 'add', os.path.join('infra', 'bots', 'tasks.json')])
rmistry 2016/10/18 11:49:14 I do not remember: Is the added file uploaded by a
borenet 2016/10/18 11:58:15 git_utils.GitBranch does a commit, so any "git add
53 66
54 67
55 if '__main__' == __name__: 68 if '__main__' == __name__:
56 parser = argparse.ArgumentParser() 69 parser = argparse.ArgumentParser()
57 parser.add_argument("--target_dir") 70 parser.add_argument("--target_dir")
58 args = parser.parse_args() 71 args = parser.parse_args()
59 main(args.target_dir) 72 main(args.target_dir)
OLDNEW
« no previous file with comments | « infra/bots/tasks.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698