mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1397847: Pass the taskcluster root to load_tasks_for_kind
in mach artifact toolchain
; r=dustin a=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D13433 --HG-- extra : rebase_source : ab46822cbf7cb72de61285eb336cb80356943752 extra : amend_source : 9ec807b18a8cc7d1b5d33cb4a4c65988fee4ff00
This commit is contained in:
parent
b3613ec011
commit
a3540aa22f
@ -1313,8 +1313,6 @@ class PackageFrontend(MachCommandBase):
|
||||
import requests
|
||||
import shutil
|
||||
|
||||
from taskgraph.config import load_graph_config
|
||||
from taskgraph.generator import Kind
|
||||
from taskgraph.util.taskcluster import (
|
||||
get_artifact_url,
|
||||
)
|
||||
@ -1433,7 +1431,8 @@ class PackageFrontend(MachCommandBase):
|
||||
strict=False,
|
||||
)
|
||||
|
||||
toolchains = load_tasks_for_kind(params, 'toolchain')
|
||||
root_dir = mozpath.join(self.topsrcdir, 'taskcluster/ci')
|
||||
toolchains = load_tasks_for_kind(params, 'toolchain', root_dir=root_dir)
|
||||
|
||||
aliases = {}
|
||||
for t in toolchains.values():
|
||||
|
@ -382,13 +382,13 @@ class TaskGraphGenerator(object):
|
||||
)
|
||||
|
||||
|
||||
def load_tasks_for_kind(parameters, kind):
|
||||
def load_tasks_for_kind(parameters, kind, root_dir=None):
|
||||
"""
|
||||
Get all the tasks of a given kind.
|
||||
|
||||
This function is designed to be called from outside of taskgraph.
|
||||
"""
|
||||
tgg = TaskGraphGenerator(root_dir=None, parameters=parameters, target_kind=kind)
|
||||
tgg = TaskGraphGenerator(root_dir=root_dir, parameters=parameters, target_kind=kind)
|
||||
return {
|
||||
task.task['metadata']['name']: task
|
||||
for task in tgg.full_task_set
|
||||
|
Loading…
Reference in New Issue
Block a user