Bug 1464523: [release] Pass the repository of the project being built to update-verify config generation; r=bhearsum

Differential Revision: https://phabricator.services.mozilla.com/D1414

--HG--
extra : rebase_source : 5d79c925878223373ebd6608de41220ecb91952e
This commit is contained in:
Tom Prince 2018-05-23 15:34:18 -06:00
Родитель 91c5e8ff30
Коммит 8da7f2a4cd
3 изменённых файлов: 18 добавлений и 6 удалений

Просмотреть файл

@ -597,7 +597,15 @@ TREEHERDER_ROUTE_ROOT = 'tc-treeherder'
def get_branch_rev(config):
return config.params['{}head_rev'.format(config.graph_config['project-repo-param-prefix'])]
return config.params['{}head_rev'.format(
config.graph_config['project-repo-param-prefix']
)]
def get_branch_repo(config):
return config.params['{}head_repository'.format(
config.graph_config['project-repo-param-prefix'],
)]
COALESCE_KEY = '{project}.{job-identifier}'

Просмотреть файл

@ -12,6 +12,10 @@ import urlparse
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import resolve_keyed_by
from taskgraph.util.scriptworker import get_release_config
from taskgraph.transforms.task import (
get_branch_repo,
get_branch_rev,
)
transforms = TransformSequence()
@ -68,11 +72,11 @@ def add_command(config, tasks):
"--to-app-version", release_config["appVersion"],
"--to-build-number", str(release_config["build_number"]),
"--to-buildid", config.params["moz_build_date"],
"--to-revision", config.params["head_rev"],
"--to-revision", get_branch_rev(config),
"--output-file", "update-verify.cfg",
]
repo_path = urlparse.urlsplit(config.params["head_repository"]).path.lstrip("/")
repo_path = urlparse.urlsplit(get_branch_repo(config)).path.lstrip("/")
command.extend(["--repo-path", repo_path])
if release_config.get("partial_versions"):

Просмотреть файл

@ -224,11 +224,11 @@ class UpdateVerifyConfigCreator(BaseScript):
# at the time of writing.
branch = None
if release_info["category"] == "dev":
branch = "releases/{}-beta".format(self.config['branch-prefix'])
branch = "releases/{}-beta".format(self.config['branch_prefix'])
elif release_info["category"] == "esr":
branch = "releases/{}-esr{}".format(self.config['branch-prefix'], version[:2])
branch = "releases/{}-esr{}".format(self.config['branch_prefix'], version[:2])
elif release_info["category"] in ("major", "stability"):
branch = "releases/{}-release".format(self.config['branch-prefix'])
branch = "releases/{}-release".format(self.config['branch_prefix'])
if not branch:
raise Exception("Cannot determine branch, cannot continue!")