Revision control

Copy as Markdown

# 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
from taskgraph.transforms.base import TransformSequence
from ..build_config import get_version
transforms = TransformSequence()
def setup_command(config, tasks):
version = get_version(config.params)
instance = "production" if config.params["level"] == "3" else "staging"
nightly = "-nightly" if config.params.get("preview-build") else ""
maven_channel = f"maven{nightly}-{instance}"
release_type = config.params.get('release-type', 'nightly')
head_rev = config.params["head_rev"]
for task in tasks:
task["run"]["commands"] = [
"--version", version,
"--maven-channel", maven_channel,
task['worker']['artifacts'] = [
"name": f"public/build/{release_type}.json",
"path": f"/builds/worker/checkouts/vcs/build/{release_type}.json",
"type": "file",
if config.params['level'] == '3':
task["routes"] = [
yield task
def convert_dependencies(config, tasks):
Convert kind dependencies into soft-dependencies
The `release-publish` task lists the `build-summary` task as a kind dependency, but we need a
transform to setup the actual dependency. When is merged, we could simplify this code.
for task in tasks:
task.setdefault("soft-dependencies", [])
task["soft-dependencies"] += [
for dep_task in config.kind_dependencies_tasks.values()
yield task