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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/bots/tasks.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/upload_skps.py
diff --git a/infra/bots/upload_skps.py b/infra/bots/upload_skps.py
index 8d76b801dca7758d50fbd863f92b1eec6c796104..2193f343fc420175a17cb14360f7a8b726d208ab 100644
--- a/infra/bots/upload_skps.py
+++ b/infra/bots/upload_skps.py
@@ -44,12 +44,25 @@ def main(target_dir):
subprocess.check_call(['download_from_google_storage', '-s', cipd_sha1,
'--bucket', 'chromium-luci'])
+ # First verify that there are no gen_tasks diffs.
+ gen_tasks = os.path.join(os.getcwd(), 'infra', 'bots', 'gen_tasks.go')
+ try:
+ subprocess.check_call(['go', 'run', gen_tasks, '--test'])
+ except subprocess.CalledProcessError as e:
+ print >> sys.stderr, ('gen_tasks.go failed, not uploading SKP update:\n\n%s'
+ % e.output)
+ sys.exit(1)
+
+ # Upload the new version, land the update CL.
with git_utils.GitBranch(branch_name='update_skp_version',
commit_msg=COMMIT_MSG,
commit_queue=True):
upload_script = os.path.join(
os.getcwd(), 'infra', 'bots', 'assets', 'skp', 'upload.py')
subprocess.check_call(['python', upload_script, '-t', target_dir])
+ subprocess.check_call(['go', 'run', gen_tasks])
+ subprocess.check_call([
+ '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
if '__main__' == __name__:
« 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