mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1341214 - Define GECKO in a single location. r=dustin
Instead of every file trying to get the top source directory having an ad-hoc definition that gets wrong if the files gets moved around for some reason, define it in a more central location. --HG-- extra : rebase_source : 1a0cbea267193f6b388b88b36166353e20ac8569
This commit is contained in:
parent
318137c0da
commit
28cdcbdebb
@ -0,0 +1,7 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import os
|
||||
|
||||
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..'))
|
@ -21,6 +21,7 @@ from .util import (
|
||||
calculate_head_rev
|
||||
)
|
||||
from ..create import create_task
|
||||
from .. import GECKO
|
||||
from taskgraph.util.attributes import match_run_on_projects
|
||||
from taskgraph.util.schema import resolve_keyed_by
|
||||
|
||||
@ -32,7 +33,6 @@ JOB_TYPES = {
|
||||
'decision-task': decision.run_decision_task,
|
||||
}
|
||||
|
||||
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..', '..'))
|
||||
logger = logging.getLogger(__name__)
|
||||
_session = None
|
||||
|
||||
|
@ -18,6 +18,7 @@ from .create import create_tasks
|
||||
from .parameters import Parameters
|
||||
from .taskgraph import TaskGraph
|
||||
from actions import render_actions_json
|
||||
from . import GECKO
|
||||
|
||||
from taskgraph.util.templates import Templates
|
||||
from taskgraph.util.time import (
|
||||
@ -28,7 +29,6 @@ from taskgraph.util.time import (
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
ARTIFACTS_DIR = 'artifacts'
|
||||
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..'))
|
||||
|
||||
# For each project, this gives a set of parameters specific to the project.
|
||||
# See `taskcluster/docs/parameters.rst` for information on parameters.
|
||||
|
@ -18,8 +18,8 @@ from subprocess import Popen, PIPE
|
||||
from io import BytesIO
|
||||
|
||||
from taskgraph.util import docker
|
||||
from . import GECKO
|
||||
|
||||
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..'))
|
||||
INDEX_URL = 'https://index.taskcluster.net/v1/task/' + docker.INDEX_PREFIX + '.{}.{}.hash.{}'
|
||||
ARTIFACT_URL = 'https://queue.taskcluster.net/v1/task/{}/artifacts/{}'
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
from . import (
|
||||
target_tasks,
|
||||
@ -13,8 +12,6 @@ from . import (
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
GECKO = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
|
||||
filter_task_functions = {}
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@ import os
|
||||
import urllib2
|
||||
|
||||
from . import base
|
||||
from .. import GECKO
|
||||
from taskgraph.util.docker import (
|
||||
docker_image,
|
||||
generate_context_hash,
|
||||
@ -17,7 +18,6 @@ from taskgraph.util.docker import (
|
||||
from taskgraph.util.templates import Templates
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..', '..'))
|
||||
|
||||
# if running in a task, prefer to use the taskcluster proxy (http://taskcluster/),
|
||||
# otherwise hit the services directly
|
||||
|
@ -4,13 +4,10 @@
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
from .graph import Graph
|
||||
from .util.python_path import find_object
|
||||
|
||||
TASKCLUSTER_QUEUE_URL = "https://queue.taskcluster.net/v1/task/"
|
||||
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..'))
|
||||
|
||||
|
||||
class TaskGraph(object):
|
||||
|
@ -7,8 +7,6 @@ Support for running toolchain-building jobs via dedicated scripts
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
from voluptuous import Schema, Optional, Required, Any
|
||||
|
||||
from taskgraph.transforms.job import run_job_using
|
||||
@ -18,9 +16,9 @@ from taskgraph.transforms.job.common import (
|
||||
docker_worker_support_vcs_checkout,
|
||||
)
|
||||
from taskgraph.util.hash import hash_paths
|
||||
from taskgraph import GECKO
|
||||
|
||||
|
||||
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..', '..', '..'))
|
||||
TOOLCHAIN_INDEX = 'gecko.cache.level-{level}.toolchains.v1.{name}.{digest}'
|
||||
|
||||
toolchain_run_schema = Schema({
|
||||
|
@ -14,9 +14,9 @@ import tempfile
|
||||
from mozpack.archive import (
|
||||
create_tar_gz_from_files,
|
||||
)
|
||||
from .. import GECKO
|
||||
|
||||
|
||||
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..', '..'))
|
||||
IMAGE_DIR = os.path.join(GECKO, 'taskcluster', 'docker')
|
||||
INDEX_PREFIX = 'docker.images.v2'
|
||||
ARTIFACT_URL = 'https://queue.taskcluster.net/v1/task/{}/artifacts/{}'
|
||||
|
Loading…
Reference in New Issue
Block a user