Bug 1111980 - Part 3 When --extend-graph is passed do not include metadata or scopes. r=garndt

This commit is contained in:
2014-12-09 15:03:07 -08:00
parent b8e032f27b
commit c3c1a5f5f9
2 changed files with 18 additions and 15 deletions

View File

@@ -92,14 +92,12 @@ class TryGraph(object):
help='URL for "base" repository to clone')
@CommandArgument('--head-repository',
default=os.environ.get('GECKO_HEAD_REPOSITORY'),
required=True,
help='URL for "head" repository to fetch revision from')
@CommandArgument('--head-ref',
default=os.environ.get('GECKO_HEAD_REF'),
help='Reference (this is same as rev usually for hg)')
@CommandArgument('--head-rev',
default=os.environ.get('GECKO_HEAD_REV'),
required=True,
help='Commit revision to use from head repository')
@CommandArgument('--message',
required=True,
@@ -132,14 +130,13 @@ class TryGraph(object):
'scopes': []
}
if params['ci'] is False:
graph['metadata'] = {
'source': 'http://todo.com/what/goes/here',
'owner': params['owner'],
# TODO: Add full mach commands to this example?
'description': 'Try task graph generated via ./mach trygraph',
'name': 'trygraph local'
}
graph['metadata'] = {
'source': 'http://todo.com/what/goes/here',
'owner': params['owner'],
# TODO: Add full mach commands to this example?
'description': 'Try task graph generated via ./mach trygraph',
'name': 'trygraph local'
}
for build in job_graph:
build_parameters = dict(parameters)
@@ -195,6 +192,12 @@ class TryGraph(object):
graph['scopes'].extend(test_task['task'].get('scopes', []))
graph['scopes'] = list(set(graph['scopes']))
# When we are extending the graph remove extra fields...
if params['ci'] is True:
graph.pop('scopes', None)
graph.pop('metadata', None)
print(json.dumps(graph, indent=4))
@CommandProvider