| 1 |
#!/usr/bin/env python |
| 2 |
# |
| 3 |
# Copyright 2018 Google LLC |
| 4 |
# |
| 5 |
# Use of this source code is governed by a BSD-style license that can be |
| 6 |
# found in the LICENSE file. |
| 7 |
|
| 8 |
|
| 9 |
from __future__ import print_function |
| 10 |
import os |
| 11 |
import subprocess |
| 12 |
import sys |
| 13 |
|
| 14 |
|
| 15 |
kitchen = os.path.join(os.getcwd(), 'kitchen') |
| 16 |
logdog_url = 'logdog://logs.chromium.org/%s/%s/+/annotations' % ( |
| 17 |
sys.argv[4], os.environ['SWARMING_TASK_ID']) |
| 18 |
|
| 19 |
cmd = [ |
| 20 |
kitchen, 'cook', |
| 21 |
'-checkout-dir', 'recipe_bundle', |
| 22 |
'-mode', 'swarming', |
| 23 |
'-luci-system-account', 'system', |
| 24 |
'-cache-dir', 'cache', |
| 25 |
'-temp-dir', 'tmp', |
| 26 |
'-known-gerrit-host', 'android.googlesource.com', |
| 27 |
'-known-gerrit-host', 'boringssl.googlesource.com', |
| 28 |
'-known-gerrit-host', 'chromium.googlesource.com', |
| 29 |
'-known-gerrit-host', 'dart.googlesource.com', |
| 30 |
'-known-gerrit-host', 'fuchsia.googlesource.com', |
| 31 |
'-known-gerrit-host', 'go.googlesource.com', |
| 32 |
'-known-gerrit-host', 'llvm.googlesource.com', |
| 33 |
'-known-gerrit-host', 'skia.googlesource.com', |
| 34 |
'-known-gerrit-host', 'webrtc.googlesource.com', |
| 35 |
'-recipe', sys.argv[2], |
| 36 |
'-properties', sys.argv[3], |
| 37 |
'-logdog-annotation-url', logdog_url, |
| 38 |
] |
| 39 |
print('running command: %s' % ' '.join(cmd)) |
| 40 |
subprocess.check_call(cmd) |