diff --git a/.taskcluster.yml b/.taskcluster.yml index 2cc3978da7de..b71ef866f273 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -104,7 +104,7 @@ tasks: --pushlog-id='{{pushlog_id}}' --pushdate='{{pushdate}}' --project='{{project}}' - --message='{{comment}}' + --message={{#shellquote}}{{{comment}}}{{/shellquote}} --owner='{{owner}}' --level='{{level}}' --base-repository='https://hg.mozilla.org/mozilla-central' diff --git a/taskcluster/taskgraph/transforms/tests/make_task_description.py b/taskcluster/taskgraph/transforms/tests/make_task_description.py index c86f53b0dcbb..a1bb6ec9abc0 100644 --- a/taskcluster/taskgraph/transforms/tests/make_task_description.py +++ b/taskcluster/taskgraph/transforms/tests/make_task_description.py @@ -174,6 +174,9 @@ def docker_worker_setup(config, test, taskdesc): if 'actions' in mozharness: env['MOZHARNESS_ACTIONS'] = ' '.join(mozharness['actions']) + if config.params['project'] == 'try': + env['TRY_COMMIT_MSG'] = config.params['message'] + # handle some of the mozharness-specific options if mozharness['tooltool-downloads']: diff --git a/testing/mozharness/mozharness/mozilla/testing/try_tools.py b/testing/mozharness/mozharness/mozilla/testing/try_tools.py index e406a7582f38..16386b6a24ed 100644 --- a/testing/mozharness/mozharness/mozilla/testing/try_tools.py +++ b/testing/mozharness/mozharness/mozilla/testing/try_tools.py @@ -78,6 +78,8 @@ class TryToolsMixin(TransferMixin): msg = None if "try_message" in self.config and self.config["try_message"]: msg = self.config["try_message"] + elif 'TRY_COMMIT_MSG' in os.environ: + msg = os.environ['TRY_COMMIT_MSG'] elif self._is_try(): if self.buildbot_config['sourcestamp']['changes']: msg = self.buildbot_config['sourcestamp']['changes'][-1]['comments'] @@ -154,7 +156,8 @@ class TryToolsMixin(TransferMixin): repo_path = None if self.buildbot_config and 'properties' in self.buildbot_config: repo_path = self.buildbot_config['properties'].get('branch') - return self.config.get('branch', repo_path) == 'try' + return (self.config.get('branch', repo_path) == 'try' or + 'TRY_COMMIT_MSG' in os.environ) @PostScriptAction('download-and-extract') def set_extra_try_arguments(self, action, success=None):