зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1534283 - filter out tasks when DONT-BUILD is in the message r=aki,tomprince
(without the dash, because I want *this* push to build) This filters out all tasks, but that means that several things will still run: * docker images and tasks they depend on (debian packages) * always_run tasks (various python-y things) Differential Revision: https://phabricator.services.mozilla.com/D23020 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4b406f0a1e
Коммит
862d7484c2
|
@ -222,6 +222,8 @@ def get_decision_parameters(config, options):
|
|||
if n in options and options[n] is not None:
|
||||
parameters[n] = options[n]
|
||||
|
||||
commit_message = get_hg_commit_message(os.path.join(GECKO, product_dir))
|
||||
|
||||
# Define default filter list, as most configurations shouldn't need
|
||||
# custom filters.
|
||||
parameters['filters'] = [
|
||||
|
@ -233,8 +235,7 @@ def get_decision_parameters(config, options):
|
|||
parameters['build_number'] = 1
|
||||
parameters['version'] = get_version(product_dir)
|
||||
parameters['app_version'] = get_app_version(product_dir)
|
||||
parameters['message'] = try_syntax_from_message(
|
||||
get_hg_commit_message(os.path.join(GECKO, product_dir)))
|
||||
parameters['message'] = try_syntax_from_message(commit_message)
|
||||
parameters['hg_branch'] = get_hg_revision_branch(GECKO, revision=parameters['head_rev'])
|
||||
parameters['next_version'] = None
|
||||
parameters['phabricator_diff'] = None
|
||||
|
@ -276,6 +277,12 @@ def get_decision_parameters(config, options):
|
|||
if options.get('target_tasks_method'):
|
||||
parameters['target_tasks_method'] = options['target_tasks_method']
|
||||
|
||||
# ..but can be overridden by the commit message: if it contains the special
|
||||
# string "DONTBUILD" and this is an on-push decision task, then use the
|
||||
# special 'nothing' target task method.
|
||||
if 'DONTBUILD' in commit_message and options['tasks_for'] == 'hg-push':
|
||||
parameters['target_tasks_method'] = 'nothing'
|
||||
|
||||
# If the target method is nightly, we should build partials. This means
|
||||
# knowing what has been released previously.
|
||||
# An empty release_history is fine, it just means no partials will be built
|
||||
|
|
|
@ -682,3 +682,9 @@ def target_tasks_codereview(full_task_graph, parameters, graph_config):
|
|||
return False
|
||||
|
||||
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
||||
|
||||
|
||||
@_target_task('nothing')
|
||||
def target_tasks_nothing(full_task_graph, parameters, graph_config):
|
||||
"""Select nothing, for DONTBUILD pushes"""
|
||||
return []
|
||||
|
|
Загрузка…
Ссылка в новой задаче