OLD | NEW |
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 """Post a try job request via HTTP to the Tryserver to produce build.""" | 5 """Post a try job request via HTTP to the Tryserver to produce build.""" |
6 | 6 |
7 import getpass | 7 import getpass |
8 import json | 8 import json |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
11 import sys | 11 import sys |
12 import urllib | 12 import urllib |
13 import urllib2 | 13 import urllib2 |
14 | 14 |
15 # Link to get JSON data of builds | 15 # Link to get JSON data of builds |
16 BUILDER_JSON_URL = ('%(server_url)s/json/builders/%(bot_name)s/builds/' | 16 BUILDER_JSON_URL = ('%(server_url)s/json/builders/%(bot_name)s/builds/' |
17 '%(build_num)s?as_text=1&filter=0') | 17 '%(build_num)s?as_text=1&filter=0') |
18 | 18 |
19 # Link to display build steps | 19 # Link to display build steps |
20 BUILDER_HTML_URL = ('%(server_url)s/builders/%(bot_name)s/builds/%(build_num)s') | 20 BUILDER_HTML_URL = ('%(server_url)s/builders/%(bot_name)s/builds/%(build_num)s') |
21 | 21 |
22 # Tryserver buildbots status page | 22 # Tryserver buildbots status page |
23 TRY_SERVER_URL = 'http://build.chromium.org/p/tryserver.chromium' | 23 TRY_SERVER_URL = 'http://build.chromium.org/p/tryserver.chromium.perf' |
24 | 24 |
25 # Hostname of the tryserver where perf bisect builders are hosted. This is used | 25 # Hostname of the tryserver where perf bisect builders are hosted. This is used |
26 # for posting build request to tryserver. | 26 # for posting build request to tryserver. |
27 BISECT_BUILDER_HOST = 'master4.golo.chromium.org' | 27 BISECT_BUILDER_HOST = 'master4.golo.chromium.org' |
28 # 'try_job_port' on tryserver to post build request. | 28 # 'try_job_port' on tryserver to post build request. |
29 BISECT_BUILDER_PORT = 8328 | 29 BISECT_BUILDER_PORT = 8341 |
30 | 30 |
31 | 31 |
32 # From buildbot.status.builder. | 32 # From buildbot.status.builder. |
33 # See: http://docs.buildbot.net/current/developer/results.html | 33 # See: http://docs.buildbot.net/current/developer/results.html |
34 SUCCESS, WARNINGS, FAILURE, SKIPPED, EXCEPTION, RETRY, TRYPENDING = range(7) | 34 SUCCESS, WARNINGS, FAILURE, SKIPPED, EXCEPTION, RETRY, TRYPENDING = range(7) |
35 | 35 |
36 # Status codes that can be returned by the GetBuildStatus method. | 36 # Status codes that can be returned by the GetBuildStatus method. |
37 OK = (SUCCESS, WARNINGS) | 37 OK = (SUCCESS, WARNINGS) |
38 # Indicates build failure. | 38 # Indicates build failure. |
39 FAILED = (FAILURE, EXCEPTION, SKIPPED) | 39 FAILED = (FAILURE, EXCEPTION, SKIPPED) |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 if not options.port: | 363 if not options.port: |
364 raise ServerAccessError('Please use the --port option to specify the try ' | 364 raise ServerAccessError('Please use the --port option to specify the try ' |
365 'server port to connect to.') | 365 'server port to connect to.') |
366 params = _GetQueryParams(options) | 366 params = _GetQueryParams(options) |
367 PostTryJob(params) | 367 PostTryJob(params) |
368 | 368 |
369 | 369 |
370 if __name__ == '__main__': | 370 if __name__ == '__main__': |
371 sys.exit(Main(sys.argv)) | 371 sys.exit(Main(sys.argv)) |
372 | 372 |
OLD | NEW |