forked from mirrors/gecko-dev
Bug 1252235 - Make try syntax available to mozharness from TaskCluster through an environment variable. r=armenzg
MozReview-Commit-ID: HIVIXPQXnQs --HG-- extra : rebase_source : aa6ed39fdaa5bec568fabc562319f3a2ed4f4c47
This commit is contained in:
parent
619c0c8afb
commit
2c2a464982
3 changed files with 8 additions and 2 deletions
|
|
@ -104,7 +104,7 @@ tasks:
|
||||||
--pushlog-id='{{pushlog_id}}'
|
--pushlog-id='{{pushlog_id}}'
|
||||||
--pushdate='{{pushdate}}'
|
--pushdate='{{pushdate}}'
|
||||||
--project='{{project}}'
|
--project='{{project}}'
|
||||||
--message='{{comment}}'
|
--message={{#shellquote}}{{{comment}}}{{/shellquote}}
|
||||||
--owner='{{owner}}'
|
--owner='{{owner}}'
|
||||||
--level='{{level}}'
|
--level='{{level}}'
|
||||||
--base-repository='https://hg.mozilla.org/mozilla-central'
|
--base-repository='https://hg.mozilla.org/mozilla-central'
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,9 @@ def docker_worker_setup(config, test, taskdesc):
|
||||||
if 'actions' in mozharness:
|
if 'actions' in mozharness:
|
||||||
env['MOZHARNESS_ACTIONS'] = ' '.join(mozharness['actions'])
|
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
|
# handle some of the mozharness-specific options
|
||||||
|
|
||||||
if mozharness['tooltool-downloads']:
|
if mozharness['tooltool-downloads']:
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,8 @@ class TryToolsMixin(TransferMixin):
|
||||||
msg = None
|
msg = None
|
||||||
if "try_message" in self.config and self.config["try_message"]:
|
if "try_message" in self.config and self.config["try_message"]:
|
||||||
msg = 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():
|
elif self._is_try():
|
||||||
if self.buildbot_config['sourcestamp']['changes']:
|
if self.buildbot_config['sourcestamp']['changes']:
|
||||||
msg = self.buildbot_config['sourcestamp']['changes'][-1]['comments']
|
msg = self.buildbot_config['sourcestamp']['changes'][-1]['comments']
|
||||||
|
|
@ -154,7 +156,8 @@ class TryToolsMixin(TransferMixin):
|
||||||
repo_path = None
|
repo_path = None
|
||||||
if self.buildbot_config and 'properties' in self.buildbot_config:
|
if self.buildbot_config and 'properties' in self.buildbot_config:
|
||||||
repo_path = self.buildbot_config['properties'].get('branch')
|
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')
|
@PostScriptAction('download-and-extract')
|
||||||
def set_extra_try_arguments(self, action, success=None):
|
def set_extra_try_arguments(self, action, success=None):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue