Bug 1410737: Log repositories checked out. r=gps
MozReview-Commit-ID: 7D7i8CMXjMY
--- a/taskcluster/docker/recipes/run-task
+++ b/taskcluster/docker/recipes/run-task
@@ -211,16 +211,26 @@ def vcs_checkout(source_repo, dest, stor
# Update the current revision hash and ensure that it is well formed.
revision = subprocess.check_output(
[b'hg', b'log',
b'--rev', b'.',
b'--template', b'{node}'],
cwd=dest)
assert re.match('^[a-f0-9]{40}$', revision)
+
+ repo_name = source_repo.split('/')[-1]
+ print_line(b'vcs', b"TinderboxPrint:<a href={source_repo}/rev/{revision} "
+ b"title='Built from {repo_name} revision {revision}'>"
+ b"{revision}</a>\n".format(
+ revision=revision,
+ source_repo=source_repo,
+ repo_name=repo_name,
+ ))
+
return revision
def main(args):
print_line(b'setup', b'run-task started\n')
running_as_root = os.getuid() == 0
# Arguments up to '--' are ours. After are for the main task
--- a/taskcluster/taskgraph/transforms/job/mozharness.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness.py
@@ -271,18 +271,27 @@ def mozharness_on_generic_worker(config,
hg_command.append('robustcheckout')
hg_command.extend(['--sharebase', 'y:\\hg-shared'])
hg_command.append('--purge')
hg_command.extend(['--upstream', base_repo])
hg_command.extend(['--revision', head_rev])
hg_command.append(head_repo)
hg_command.append(path)
+ logging_command = [
+ b":: TinderboxPrint:<a href={source_repo}/rev/{revision} "
+ b"title='Built from {repo_name} revision {revision}'>{revision}</a>\n".format(
+ revision=head_rev,
+ source_repo=head_repo,
+ repo_name=head_repo.split('/')[-1],
+ )]
+
return [
' '.join(hg_command),
+ ' '.join(logging_command),
]
hg_commands = checkout_repo(
base_repo=env['GECKO_BASE_REPOSITORY'],
head_repo=env['GECKO_HEAD_REPOSITORY'],
head_rev=env['GECKO_HEAD_REV'],
path='.\\build\\src')