2016-05-17 01:53:22 +03:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
2016-05-17 01:42:10 +03:00
|
|
|
from taskgraph import try_option_syntax
|
2017-01-31 22:49:18 +03:00
|
|
|
from taskgraph.util.attributes import match_run_on_projects
|
2016-05-17 01:53:22 +03:00
|
|
|
|
|
|
|
_target_task_methods = {}
|
2016-06-21 04:06:55 +03:00
|
|
|
|
|
|
|
|
2016-05-17 01:53:22 +03:00
|
|
|
def _target_task(name):
|
|
|
|
def wrap(func):
|
|
|
|
_target_task_methods[name] = func
|
|
|
|
return func
|
|
|
|
return wrap
|
|
|
|
|
2016-06-21 04:06:55 +03:00
|
|
|
|
2016-05-17 01:53:22 +03:00
|
|
|
def get_method(method):
|
|
|
|
"""Get a target_task_method to pass to a TaskGraphGenerator."""
|
|
|
|
return _target_task_methods[method]
|
|
|
|
|
2016-06-21 04:06:55 +03:00
|
|
|
|
2017-03-10 03:32:41 +03:00
|
|
|
def filter_for_project(task, parameters):
|
|
|
|
"""Filter tasks by project. Optionally enable nightlies."""
|
|
|
|
if task.attributes.get('nightly') and not parameters.get('include_nightly'):
|
|
|
|
return False
|
|
|
|
run_on_projects = set(task.attributes.get('run_on_projects', []))
|
|
|
|
return match_run_on_projects(parameters['project'], run_on_projects)
|
|
|
|
|
|
|
|
|
2016-05-17 01:53:22 +03:00
|
|
|
@_target_task('try_option_syntax')
|
|
|
|
def target_tasks_try_option_syntax(full_task_graph, parameters):
|
|
|
|
"""Generate a list of target tasks based on try syntax in
|
|
|
|
parameters['message'] and, for context, the full task graph."""
|
2016-05-17 01:42:10 +03:00
|
|
|
options = try_option_syntax.TryOptionSyntax(parameters['message'], full_task_graph)
|
2016-07-28 20:20:44 +03:00
|
|
|
target_tasks_labels = [t.label for t in full_task_graph.tasks.itervalues()
|
|
|
|
if options.task_matches(t.attributes)]
|
|
|
|
|
2017-02-02 14:34:43 +03:00
|
|
|
attributes = {
|
|
|
|
k: getattr(options, k) for k in [
|
|
|
|
'env',
|
|
|
|
'no_retry',
|
|
|
|
'tag',
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
for l in target_tasks_labels:
|
|
|
|
task = full_task_graph[l]
|
|
|
|
if 'unittest_suite' in task.attributes:
|
|
|
|
task.attributes['task_duplicates'] = options.trigger_tests
|
|
|
|
|
|
|
|
for l in target_tasks_labels:
|
|
|
|
task = full_task_graph[l]
|
|
|
|
# If the developer wants test jobs to be rebuilt N times we add that value here
|
|
|
|
if options.trigger_tests > 1 and 'unittest_suite' in task.attributes:
|
|
|
|
task.attributes['task_duplicates'] = options.trigger_tests
|
|
|
|
task.attributes['profile'] = False
|
|
|
|
|
|
|
|
# If the developer wants test talos jobs to be rebuilt N times we add that value here
|
|
|
|
if options.talos_trigger_tests > 1 and 'talos_suite' in task.attributes:
|
|
|
|
task.attributes['task_duplicates'] = options.talos_trigger_tests
|
|
|
|
task.attributes['profile'] = options.profile
|
|
|
|
|
|
|
|
task.attributes.update(attributes)
|
2016-07-28 20:20:44 +03:00
|
|
|
|
2016-09-26 20:57:14 +03:00
|
|
|
# Add notifications here as well
|
|
|
|
if options.notifications:
|
|
|
|
for task in full_task_graph:
|
|
|
|
owner = parameters.get('owner')
|
|
|
|
routes = task.task.setdefault('routes', [])
|
|
|
|
if options.notifications == 'all':
|
|
|
|
routes.append("notify.email.{}.on-any".format(owner))
|
|
|
|
elif options.notifications == 'failure':
|
|
|
|
routes.append("notify.email.{}.on-failed".format(owner))
|
|
|
|
routes.append("notify.email.{}.on-exception".format(owner))
|
|
|
|
|
2016-07-28 20:20:44 +03:00
|
|
|
return target_tasks_labels
|
2016-05-17 01:53:22 +03:00
|
|
|
|
2016-06-21 04:06:55 +03:00
|
|
|
|
2016-09-12 21:41:58 +03:00
|
|
|
@_target_task('default')
|
|
|
|
def target_tasks_default(full_task_graph, parameters):
|
|
|
|
"""Target the tasks which have indicated they should be run on this project
|
|
|
|
via the `run_on_projects` attributes."""
|
2017-03-10 03:32:41 +03:00
|
|
|
|
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems()
|
|
|
|
if filter_for_project(t, parameters)]
|
Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown
This introduces a completely new way of specifying test task in-tree,
completely replacing the old spider-web of YAML files.
The high-level view is this:
- some configuration files are used to determine which test suites to run
for each test platform, and against which build platforms
- each test suite is then represented by a dictionary, and modified by a
sequence of transforms, duplicating as necessary (e.g., chunks), until
it becomes a task definition
The transforms allow sufficient generality to support just about any desired
configuration, with the advantage that common configurations are "easy" while
unusual configurations are supported but notable for their oddness (they
require a custom transform).
As of this commit, this system produces the same set of test graphs as the
existing YAML, modulo:
- extra.treeherder.groupName -- this was not consistent in the YAML
- extra.treeherder.build -- this is ignored by taskcluster-treeherder anyway
- mozharness command argument order
- boolean True values for environment variables are now the string "true"
- metadata -- this is now much more consistent, with task name being the label
Testing of this commit demonstrates that it produces the same set of test tasks for
the following projects (those which had special cases defined in the YAML):
- autoland
- ash (*)
- willow
- mozilla-inbound
- mozilla-central
- try:
-b do -p all -t all -u all
-b d -p linux64,linux64-asan -u reftest -t none
-b d -p linux64,linux64-asan -u reftest[x64] -t none[x64]
(*) this patch omits the linux64/debug tc-M-e10s(dt) test, which is enabled on
ash; ash will require a small changeset to re-enable this test.
IGNORE BAD COMMIT MESSAGES (because the hook flags try syntax!)
MozReview-Commit-ID: G34dg9f17Hq
--HG--
rename : taskcluster/taskgraph/kind/base.py => taskcluster/taskgraph/task/base.py
rename : taskcluster/taskgraph/kind/docker_image.py => taskcluster/taskgraph/task/docker_image.py
rename : taskcluster/taskgraph/kind/legacy.py => taskcluster/taskgraph/task/legacy.py
extra : rebase_source : 03e70902c2d3a297eb9e3ce852f8737c2550d5a6
extra : histedit_source : d4d9f4b192605af21f41d83495fc3c923759c3cb
2016-07-12 02:27:14 +03:00
|
|
|
|
|
|
|
|
|
|
|
@_target_task('ash_tasks')
|
2016-09-12 21:41:58 +03:00
|
|
|
def target_tasks_ash(full_task_graph, parameters):
|
|
|
|
"""Target tasks that only run on the ash branch."""
|
Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown
This introduces a completely new way of specifying test task in-tree,
completely replacing the old spider-web of YAML files.
The high-level view is this:
- some configuration files are used to determine which test suites to run
for each test platform, and against which build platforms
- each test suite is then represented by a dictionary, and modified by a
sequence of transforms, duplicating as necessary (e.g., chunks), until
it becomes a task definition
The transforms allow sufficient generality to support just about any desired
configuration, with the advantage that common configurations are "easy" while
unusual configurations are supported but notable for their oddness (they
require a custom transform).
As of this commit, this system produces the same set of test graphs as the
existing YAML, modulo:
- extra.treeherder.groupName -- this was not consistent in the YAML
- extra.treeherder.build -- this is ignored by taskcluster-treeherder anyway
- mozharness command argument order
- boolean True values for environment variables are now the string "true"
- metadata -- this is now much more consistent, with task name being the label
Testing of this commit demonstrates that it produces the same set of test tasks for
the following projects (those which had special cases defined in the YAML):
- autoland
- ash (*)
- willow
- mozilla-inbound
- mozilla-central
- try:
-b do -p all -t all -u all
-b d -p linux64,linux64-asan -u reftest -t none
-b d -p linux64,linux64-asan -u reftest[x64] -t none[x64]
(*) this patch omits the linux64/debug tc-M-e10s(dt) test, which is enabled on
ash; ash will require a small changeset to re-enable this test.
IGNORE BAD COMMIT MESSAGES (because the hook flags try syntax!)
MozReview-Commit-ID: G34dg9f17Hq
--HG--
rename : taskcluster/taskgraph/kind/base.py => taskcluster/taskgraph/task/base.py
rename : taskcluster/taskgraph/kind/docker_image.py => taskcluster/taskgraph/task/docker_image.py
rename : taskcluster/taskgraph/kind/legacy.py => taskcluster/taskgraph/task/legacy.py
extra : rebase_source : 03e70902c2d3a297eb9e3ce852f8737c2550d5a6
extra : histedit_source : d4d9f4b192605af21f41d83495fc3c923759c3cb
2016-07-12 02:27:14 +03:00
|
|
|
def filter(task):
|
2016-09-12 21:41:58 +03:00
|
|
|
platform = task.attributes.get('build_platform')
|
2017-02-10 20:26:00 +03:00
|
|
|
# Early return if platform is None
|
|
|
|
if not platform:
|
Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown
This introduces a completely new way of specifying test task in-tree,
completely replacing the old spider-web of YAML files.
The high-level view is this:
- some configuration files are used to determine which test suites to run
for each test platform, and against which build platforms
- each test suite is then represented by a dictionary, and modified by a
sequence of transforms, duplicating as necessary (e.g., chunks), until
it becomes a task definition
The transforms allow sufficient generality to support just about any desired
configuration, with the advantage that common configurations are "easy" while
unusual configurations are supported but notable for their oddness (they
require a custom transform).
As of this commit, this system produces the same set of test graphs as the
existing YAML, modulo:
- extra.treeherder.groupName -- this was not consistent in the YAML
- extra.treeherder.build -- this is ignored by taskcluster-treeherder anyway
- mozharness command argument order
- boolean True values for environment variables are now the string "true"
- metadata -- this is now much more consistent, with task name being the label
Testing of this commit demonstrates that it produces the same set of test tasks for
the following projects (those which had special cases defined in the YAML):
- autoland
- ash (*)
- willow
- mozilla-inbound
- mozilla-central
- try:
-b do -p all -t all -u all
-b d -p linux64,linux64-asan -u reftest -t none
-b d -p linux64,linux64-asan -u reftest[x64] -t none[x64]
(*) this patch omits the linux64/debug tc-M-e10s(dt) test, which is enabled on
ash; ash will require a small changeset to re-enable this test.
IGNORE BAD COMMIT MESSAGES (because the hook flags try syntax!)
MozReview-Commit-ID: G34dg9f17Hq
--HG--
rename : taskcluster/taskgraph/kind/base.py => taskcluster/taskgraph/task/base.py
rename : taskcluster/taskgraph/kind/docker_image.py => taskcluster/taskgraph/task/docker_image.py
rename : taskcluster/taskgraph/kind/legacy.py => taskcluster/taskgraph/task/legacy.py
extra : rebase_source : 03e70902c2d3a297eb9e3ce852f8737c2550d5a6
extra : histedit_source : d4d9f4b192605af21f41d83495fc3c923759c3cb
2016-07-12 02:27:14 +03:00
|
|
|
return False
|
2017-02-10 20:26:00 +03:00
|
|
|
# Only on Linux platforms
|
|
|
|
if 'linux' not in platform:
|
Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown
This introduces a completely new way of specifying test task in-tree,
completely replacing the old spider-web of YAML files.
The high-level view is this:
- some configuration files are used to determine which test suites to run
for each test platform, and against which build platforms
- each test suite is then represented by a dictionary, and modified by a
sequence of transforms, duplicating as necessary (e.g., chunks), until
it becomes a task definition
The transforms allow sufficient generality to support just about any desired
configuration, with the advantage that common configurations are "easy" while
unusual configurations are supported but notable for their oddness (they
require a custom transform).
As of this commit, this system produces the same set of test graphs as the
existing YAML, modulo:
- extra.treeherder.groupName -- this was not consistent in the YAML
- extra.treeherder.build -- this is ignored by taskcluster-treeherder anyway
- mozharness command argument order
- boolean True values for environment variables are now the string "true"
- metadata -- this is now much more consistent, with task name being the label
Testing of this commit demonstrates that it produces the same set of test tasks for
the following projects (those which had special cases defined in the YAML):
- autoland
- ash (*)
- willow
- mozilla-inbound
- mozilla-central
- try:
-b do -p all -t all -u all
-b d -p linux64,linux64-asan -u reftest -t none
-b d -p linux64,linux64-asan -u reftest[x64] -t none[x64]
(*) this patch omits the linux64/debug tc-M-e10s(dt) test, which is enabled on
ash; ash will require a small changeset to re-enable this test.
IGNORE BAD COMMIT MESSAGES (because the hook flags try syntax!)
MozReview-Commit-ID: G34dg9f17Hq
--HG--
rename : taskcluster/taskgraph/kind/base.py => taskcluster/taskgraph/task/base.py
rename : taskcluster/taskgraph/kind/docker_image.py => taskcluster/taskgraph/task/docker_image.py
rename : taskcluster/taskgraph/kind/legacy.py => taskcluster/taskgraph/task/legacy.py
extra : rebase_source : 03e70902c2d3a297eb9e3ce852f8737c2550d5a6
extra : histedit_source : d4d9f4b192605af21f41d83495fc3c923759c3cb
2016-07-12 02:27:14 +03:00
|
|
|
return False
|
2017-02-10 20:26:00 +03:00
|
|
|
# No random non-build jobs either. This is being purposely done as a
|
|
|
|
# blacklist so newly-added jobs aren't missed by default.
|
|
|
|
for p in ('nightly', 'haz', 'artifact', 'cov', 'add-on'):
|
|
|
|
if p in platform:
|
|
|
|
return False
|
|
|
|
for k in ('toolchain', 'l10n', 'static-analysis'):
|
|
|
|
if k in task.attributes['kind']:
|
|
|
|
return False
|
2016-09-12 21:41:58 +03:00
|
|
|
# and none of this linux64-asan/debug stuff
|
|
|
|
if platform == 'linux64-asan' and task.attributes['build_type'] == 'debug':
|
Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown
This introduces a completely new way of specifying test task in-tree,
completely replacing the old spider-web of YAML files.
The high-level view is this:
- some configuration files are used to determine which test suites to run
for each test platform, and against which build platforms
- each test suite is then represented by a dictionary, and modified by a
sequence of transforms, duplicating as necessary (e.g., chunks), until
it becomes a task definition
The transforms allow sufficient generality to support just about any desired
configuration, with the advantage that common configurations are "easy" while
unusual configurations are supported but notable for their oddness (they
require a custom transform).
As of this commit, this system produces the same set of test graphs as the
existing YAML, modulo:
- extra.treeherder.groupName -- this was not consistent in the YAML
- extra.treeherder.build -- this is ignored by taskcluster-treeherder anyway
- mozharness command argument order
- boolean True values for environment variables are now the string "true"
- metadata -- this is now much more consistent, with task name being the label
Testing of this commit demonstrates that it produces the same set of test tasks for
the following projects (those which had special cases defined in the YAML):
- autoland
- ash (*)
- willow
- mozilla-inbound
- mozilla-central
- try:
-b do -p all -t all -u all
-b d -p linux64,linux64-asan -u reftest -t none
-b d -p linux64,linux64-asan -u reftest[x64] -t none[x64]
(*) this patch omits the linux64/debug tc-M-e10s(dt) test, which is enabled on
ash; ash will require a small changeset to re-enable this test.
IGNORE BAD COMMIT MESSAGES (because the hook flags try syntax!)
MozReview-Commit-ID: G34dg9f17Hq
--HG--
rename : taskcluster/taskgraph/kind/base.py => taskcluster/taskgraph/task/base.py
rename : taskcluster/taskgraph/kind/docker_image.py => taskcluster/taskgraph/task/docker_image.py
rename : taskcluster/taskgraph/kind/legacy.py => taskcluster/taskgraph/task/legacy.py
extra : rebase_source : 03e70902c2d3a297eb9e3ce852f8737c2550d5a6
extra : histedit_source : d4d9f4b192605af21f41d83495fc3c923759c3cb
2016-07-12 02:27:14 +03:00
|
|
|
return False
|
2016-12-31 00:17:00 +03:00
|
|
|
# no non-e10s tests
|
2017-01-27 11:14:53 +03:00
|
|
|
if task.attributes.get('unittest_suite'):
|
2016-09-12 21:41:58 +03:00
|
|
|
if not task.attributes.get('e10s'):
|
|
|
|
return False
|
2017-01-27 11:14:53 +03:00
|
|
|
# don't run talos on ash
|
|
|
|
if task.attributes.get('unittest_suite') == 'talos':
|
|
|
|
return False
|
2016-09-12 21:41:58 +03:00
|
|
|
# don't upload symbols
|
|
|
|
if task.attributes['kind'] == 'upload-symbols':
|
Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown
This introduces a completely new way of specifying test task in-tree,
completely replacing the old spider-web of YAML files.
The high-level view is this:
- some configuration files are used to determine which test suites to run
for each test platform, and against which build platforms
- each test suite is then represented by a dictionary, and modified by a
sequence of transforms, duplicating as necessary (e.g., chunks), until
it becomes a task definition
The transforms allow sufficient generality to support just about any desired
configuration, with the advantage that common configurations are "easy" while
unusual configurations are supported but notable for their oddness (they
require a custom transform).
As of this commit, this system produces the same set of test graphs as the
existing YAML, modulo:
- extra.treeherder.groupName -- this was not consistent in the YAML
- extra.treeherder.build -- this is ignored by taskcluster-treeherder anyway
- mozharness command argument order
- boolean True values for environment variables are now the string "true"
- metadata -- this is now much more consistent, with task name being the label
Testing of this commit demonstrates that it produces the same set of test tasks for
the following projects (those which had special cases defined in the YAML):
- autoland
- ash (*)
- willow
- mozilla-inbound
- mozilla-central
- try:
-b do -p all -t all -u all
-b d -p linux64,linux64-asan -u reftest -t none
-b d -p linux64,linux64-asan -u reftest[x64] -t none[x64]
(*) this patch omits the linux64/debug tc-M-e10s(dt) test, which is enabled on
ash; ash will require a small changeset to re-enable this test.
IGNORE BAD COMMIT MESSAGES (because the hook flags try syntax!)
MozReview-Commit-ID: G34dg9f17Hq
--HG--
rename : taskcluster/taskgraph/kind/base.py => taskcluster/taskgraph/task/base.py
rename : taskcluster/taskgraph/kind/docker_image.py => taskcluster/taskgraph/task/docker_image.py
rename : taskcluster/taskgraph/kind/legacy.py => taskcluster/taskgraph/task/legacy.py
extra : rebase_source : 03e70902c2d3a297eb9e3ce852f8737c2550d5a6
extra : histedit_source : d4d9f4b192605af21f41d83495fc3c923759c3cb
2016-07-12 02:27:14 +03:00
|
|
|
return False
|
|
|
|
return True
|
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
2016-09-01 19:23:14 +03:00
|
|
|
|
|
|
|
|
2016-11-08 17:22:17 +03:00
|
|
|
@_target_task('cedar_tasks')
|
|
|
|
def target_tasks_cedar(full_task_graph, parameters):
|
|
|
|
"""Target tasks that only run on the cedar branch."""
|
|
|
|
def filter(task):
|
|
|
|
platform = task.attributes.get('build_platform')
|
|
|
|
# only select platforms
|
2016-11-08 17:36:19 +03:00
|
|
|
if platform not in ['linux64']:
|
2016-11-08 17:22:17 +03:00
|
|
|
return False
|
|
|
|
if task.attributes.get('unittest_suite'):
|
2016-11-08 17:36:19 +03:00
|
|
|
if not (task.attributes['unittest_suite'].startswith('mochitest')
|
|
|
|
or 'xpcshell' in task.attributes['unittest_suite']):
|
2016-11-08 17:22:17 +03:00
|
|
|
return False
|
|
|
|
return True
|
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
|
|
|
|
|
|
|
|
2016-11-16 23:40:55 +03:00
|
|
|
@_target_task('graphics_tasks')
|
|
|
|
def target_tasks_graphics(full_task_graph, parameters):
|
|
|
|
"""In addition to doing the filtering by project that the 'default'
|
|
|
|
filter does, also remove artifact builds because we have csets on
|
|
|
|
the graphics branch that aren't on the candidate branches of artifact
|
|
|
|
builds"""
|
|
|
|
filtered_for_project = target_tasks_default(full_task_graph, parameters)
|
2016-11-18 02:25:36 +03:00
|
|
|
|
2016-11-16 23:40:55 +03:00
|
|
|
def filter(task):
|
|
|
|
if task.attributes['kind'] == 'artifact-build':
|
|
|
|
return False
|
|
|
|
return True
|
|
|
|
return [l for l in filtered_for_project if filter(full_task_graph[l])]
|
|
|
|
|
|
|
|
|
2017-02-06 17:46:02 +03:00
|
|
|
@_target_task('mochitest_valgrind')
|
|
|
|
def target_tasks_valgrind(full_task_graph, parameters):
|
|
|
|
"""Target tasks that only run on the cedar branch."""
|
|
|
|
def filter(task):
|
2017-02-21 16:43:50 +03:00
|
|
|
platform = task.attributes.get('test_platform')
|
2017-02-06 17:46:02 +03:00
|
|
|
if platform not in ['linux64']:
|
|
|
|
return False
|
2017-02-21 16:43:50 +03:00
|
|
|
|
|
|
|
if task.attributes.get('unittest_suite', '').startswith('mochitest') and \
|
|
|
|
task.attributes.get('unittest_flavor', '').startswith('valgrind-plain'):
|
|
|
|
return True
|
|
|
|
return False
|
|
|
|
|
2017-02-06 17:46:02 +03:00
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
|
|
|
|
2017-02-11 01:27:15 +03:00
|
|
|
|
2017-02-08 22:16:25 +03:00
|
|
|
@_target_task('nightly_code_coverage')
|
|
|
|
def target_tasks_code_coverage(full_task_graph, parameters):
|
|
|
|
"""Target tasks that generate coverage data."""
|
|
|
|
def filter(task):
|
2017-02-21 16:43:50 +03:00
|
|
|
platform = task.attributes.get('test_platform')
|
|
|
|
if platform not in ('linux64-ccov', 'linux64-jsdcov'):
|
2017-02-08 22:16:25 +03:00
|
|
|
return False
|
|
|
|
return True
|
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
2017-02-06 17:46:02 +03:00
|
|
|
|
2017-02-11 01:27:15 +03:00
|
|
|
|
2016-09-01 19:23:14 +03:00
|
|
|
@_target_task('nightly_fennec')
|
|
|
|
def target_tasks_nightly(full_task_graph, parameters):
|
|
|
|
"""Select the set of tasks required for a nightly build of fennec. The
|
|
|
|
nightly build process involves a pipeline of builds, signing,
|
|
|
|
and, eventually, uploading the tasks to balrog."""
|
2016-09-16 11:20:38 +03:00
|
|
|
def filter(task):
|
Bug 1322041 - Support android x86, arm; and desktop linux, linux64 nightlies via Taskcluster. Unsigned. r=dustin
Involved work which landed on the date project branch with:
* Bug 1321040, by Callek (https://hg.mozilla.org/projects/date/rev/625e2238eddb)
* Bug 1319546, by kmoir@mozilla.com (https://hg.mozilla.org/projects/date/rev/70a23d243d2c, https://hg.mozilla.org/projects/date/rev/01e3de270a4f)
* Bug 1277579, by kmoir@mozilla.com (https://hg.mozilla.org/projects/date/rev/c3a160ac642b, https://hg.mozilla.org/projects/date/rev/40ee5ff8fad8, https://hg.mozilla.org/projects/date/rev/ec159b8dba7f, https://hg.mozilla.org/projects/date/rev/afd3823c852b)
* Bug 1306166, by kmoir@mozilla.com (https://hg.mozilla.org/projects/date/rev/ff2e467cc345)
MozReview-Commit-ID: 8aZr6TqjRMR
--HG--
extra : rebase_source : bbb894ce57ef1ded707176561bd3ca9dc10ca04e
2016-12-05 01:18:03 +03:00
|
|
|
platform = task.attributes.get('build_platform')
|
|
|
|
if platform in ('android-api-15-nightly', 'android-x86-nightly'):
|
|
|
|
return task.attributes.get('nightly', False)
|
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
|
|
|
|
|
|
|
|
|
|
|
@_target_task('nightly_linux')
|
|
|
|
def target_tasks_nightly_linux(full_task_graph, parameters):
|
|
|
|
"""Select the set of tasks required for a nightly build of linux. The
|
|
|
|
nightly build process involves a pipeline of builds, signing,
|
|
|
|
and, eventually, uploading the tasks to balrog."""
|
|
|
|
def filter(task):
|
|
|
|
platform = task.attributes.get('build_platform')
|
|
|
|
if platform in ('linux64-nightly', 'linux-nightly'):
|
|
|
|
return task.attributes.get('nightly', False)
|
2016-09-16 11:20:38 +03:00
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
2017-01-23 18:53:26 +03:00
|
|
|
|
2017-03-08 23:40:37 +03:00
|
|
|
|
2017-02-22 21:24:58 +03:00
|
|
|
@_target_task('mozilla_beta_tasks')
|
|
|
|
def target_tasks_mozilla_beta(full_task_graph, parameters):
|
|
|
|
"""Select the set of tasks required for a promotable beta or release build
|
|
|
|
of linux, plus android CI. The candidates build process involves a pipeline
|
|
|
|
of builds and signing, but does not include beetmover or balrog jobs."""
|
2017-03-10 03:32:41 +03:00
|
|
|
|
2017-02-22 21:24:58 +03:00
|
|
|
def filter(task):
|
2017-03-15 01:31:58 +03:00
|
|
|
if not filter_for_project(task, parameters):
|
|
|
|
return False
|
2017-02-22 21:24:58 +03:00
|
|
|
platform = task.attributes.get('build_platform')
|
2017-03-14 17:19:47 +03:00
|
|
|
if platform in ('linux64-pgo', 'linux-pgo', 'win32-pgo', 'win64-pgo',
|
|
|
|
'android-api-15-nightly', 'android-x86-nightly',
|
|
|
|
'win32', 'win64', 'macosx64'):
|
2017-03-15 01:31:58 +03:00
|
|
|
return False
|
2017-03-08 23:22:44 +03:00
|
|
|
if platform in ('linux64', 'linux'):
|
2017-03-15 01:31:58 +03:00
|
|
|
if task.attributes['build_type'] == 'opt':
|
|
|
|
return False
|
|
|
|
# skip l10n, beetmover, balrog
|
|
|
|
if task.kind in [
|
|
|
|
'balrog', 'beetmover', 'beetmover-checksums', 'beetmover-l10n',
|
2017-03-14 17:19:47 +03:00
|
|
|
'checksums-signing', 'nightly-l10n', 'nightly-l10n-signing',
|
2017-03-15 01:31:58 +03:00
|
|
|
]:
|
|
|
|
return False
|
|
|
|
return True
|
2017-03-10 03:32:41 +03:00
|
|
|
|
2017-02-22 21:24:58 +03:00
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
|
|
|
|
|
|
|
|
|
|
|
@_target_task('mozilla_release_tasks')
|
|
|
|
def target_tasks_mozilla_release(full_task_graph, parameters):
|
|
|
|
"""Select the set of tasks required for a promotable beta or release build
|
|
|
|
of linux, plus android CI. The candidates build process involves a pipeline
|
|
|
|
of builds and signing, but does not include beetmover or balrog jobs."""
|
|
|
|
return target_tasks_mozilla_beta(full_task_graph, parameters)
|
|
|
|
|
|
|
|
|
2017-03-01 17:54:15 +03:00
|
|
|
@_target_task('candidates_fennec')
|
|
|
|
def target_tasks_candidates_fennec(full_task_graph, parameters):
|
|
|
|
"""Select the set of tasks required for a candidates build of fennec. The
|
|
|
|
nightly build process involves a pipeline of builds, signing,
|
|
|
|
and, eventually, uploading the tasks to balrog."""
|
|
|
|
filtered_for_project = target_tasks_nightly(full_task_graph, parameters)
|
2017-03-01 20:20:14 +03:00
|
|
|
|
2017-03-01 17:54:15 +03:00
|
|
|
def filter(task):
|
|
|
|
if task.kind not in ['balrog']:
|
|
|
|
return task.attributes.get('nightly', False)
|
2017-03-01 20:20:14 +03:00
|
|
|
|
2017-03-01 17:54:15 +03:00
|
|
|
return [l for l in filtered_for_project if filter(full_task_graph[l])]
|
|
|
|
|
|
|
|
|
2017-02-24 18:19:04 +03:00
|
|
|
@_target_task('pine_tasks')
|
|
|
|
def target_tasks_pine(full_task_graph, parameters):
|
|
|
|
"""Bug 1339179 - no mobile automation needed on pine"""
|
|
|
|
def filter(task):
|
|
|
|
platform = task.attributes.get('build_platform')
|
|
|
|
# disable mobile jobs
|
|
|
|
if str(platform).startswith('android'):
|
|
|
|
return False
|
|
|
|
return True
|
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|
|
|
|
|
|
|
|
|
2017-01-23 18:53:26 +03:00
|
|
|
@_target_task('stylo_tasks')
|
|
|
|
def target_tasks_stylo(full_task_graph, parameters):
|
|
|
|
"""Target stylotasks that only run on the m-c branch."""
|
|
|
|
def filter(task):
|
|
|
|
platform = task.attributes.get('build_platform')
|
|
|
|
# only select platforms
|
|
|
|
if platform not in ('linux64-stylo'):
|
|
|
|
return False
|
|
|
|
return True
|
|
|
|
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
|