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

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

Issue 2175373002: Move Skia recipes from build repo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address more comments Created 4 years, 4 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/test_skia.isolate ('k') | infra/config/recipes.cfg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 """Create a CL to update the SKP version."""
6
7
8 import argparse
9 import os
10 import subprocess
11 import sys
12
13 sys.path.insert(0, os.path.join(os.getcwd(), 'common'))
14 # pylint:disable=F0401
15 from py.utils import git_utils
16
17
18
19 CHROMIUM_SKIA = 'https://chromium.googlesource.com/skia.git'
20 COMMIT_MSG = '''Update SKP version
21
22 Automatic commit by the RecreateSKPs bot.
23
24 TBR=
25 NO_MERGE_BUILDS
26 '''
27 SKIA_COMMITTER_EMAIL = 'skia.buildbots@gmail.com'
28 SKIA_COMMITTER_NAME = 'skia.buildbots'
29 SKIA_REPO = 'https://skia.googlesource.com/skia.git'
30
31
32 def main(target_dir):
33 subprocess.check_call(['git', 'config', '--local', 'user.name',
34 SKIA_COMMITTER_NAME])
35 subprocess.check_call(['git', 'config', '--local', 'user.email',
36 SKIA_COMMITTER_EMAIL])
37 if CHROMIUM_SKIA in subprocess.check_output(['git', 'remote', '-v']):
38 subprocess.check_call(['git', 'remote', 'set-url', 'origin', SKIA_REPO,
39 CHROMIUM_SKIA])
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
47 with git_utils.GitBranch(branch_name='update_skp_version',
48 commit_msg=COMMIT_MSG,
49 commit_queue=True):
50 upload_script = os.path.join(
51 os.getcwd(), 'infra', 'bots', 'assets', 'skp', 'upload.py')
52 subprocess.check_call(['python', upload_script, '-t', target_dir])
53
54
55 if '__main__' == __name__:
56 parser = argparse.ArgumentParser()
57 parser.add_argument("--target_dir")
58 args = parser.parse_args()
59 main(args.target_dir)
OLDNEW
« no previous file with comments | « infra/bots/test_skia.isolate ('k') | infra/config/recipes.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698