From 8a91da945929b08bfa916595cd1b70fd4341e007 Mon Sep 17 00:00:00 2001 From: borenet Date: Tue, 18 Oct 2016 05:20:26 -0700 Subject: [PATCH] Fix SKP version in tasks.json, make upload_skps.py update tasks.json BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2426863003 Review-Url: https://codereview.chromium.org/2426863003 --- infra/bots/tasks.json | 6 +++--- infra/bots/upload_skps.py | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index 61c45ff..1e28557 100644 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -138,7 +138,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:10" + "version": "version:12" }, { "name": "skia/bots/svg", @@ -185,7 +185,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:10" + "version": "version:12" }, { "name": "skia/bots/svg", @@ -231,7 +231,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:10" + "version": "version:12" }, { "name": "skia/bots/svg", diff --git a/infra/bots/upload_skps.py b/infra/bots/upload_skps.py index 8d76b80..2193f34 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')]) if '__main__' == __name__: -- 2.7.4