diff --git a/taskcluster/ci/android-stuff/kind.yml b/taskcluster/ci/android-stuff/kind.yml index 1afa01871a14..489ada6edd26 100644 --- a/taskcluster/ci/android-stuff/kind.yml +++ b/taskcluster/ci/android-stuff/kind.yml @@ -9,15 +9,13 @@ loader: taskgraph.loader.transform:loader transforms: + - taskgraph.transforms.try_job:transforms - taskgraph.transforms.android_stuff:transforms - taskgraph.transforms.task:transforms jobs: android-api-15-gradle-dependencies: description: "Android armv7 API 15+ gradle dependencies" - attributes: - build_platform: android-api-15-gradle-dependencies - build_type: opt index: product: mobile job-name: android-api-15-gradle-dependencies-opt @@ -66,9 +64,6 @@ jobs: android-test: description: "Android armv7 unit tests" - attributes: - build_platform: android-test - build_type: opt treeherder: platform: android-4-0-armv7-api15/opt kind: test @@ -115,9 +110,6 @@ jobs: android-lint: description: "Android lint" - attributes: - build_platform: android-lint - build_type: opt treeherder: platform: android-4-0-armv7-api15/opt kind: test @@ -186,9 +178,6 @@ jobs: android-checkstyle: description: "Android checkstyle" - attributes: - build_platform: android-checkstyle - build_type: opt treeherder: platform: android-4-0-armv7-api15/opt kind: test @@ -238,9 +227,6 @@ jobs: android-findbugs: description: "Android findbugs" - attributes: - build_platform: android-findbugs - build_type: opt treeherder: platform: android-4-0-armv7-api15/opt kind: test diff --git a/taskcluster/ci/toolchain/kind.yml b/taskcluster/ci/toolchain/kind.yml index 3a2d0327b53b..4adcada199e2 100644 --- a/taskcluster/ci/toolchain/kind.yml +++ b/taskcluster/ci/toolchain/kind.yml @@ -5,7 +5,7 @@ loader: taskgraph.loader.transform:loader transforms: - - taskgraph.transforms.build_attrs:transforms + - taskgraph.transforms.try_job:transforms - taskgraph.transforms.job:transforms - taskgraph.transforms.task:transforms diff --git a/taskcluster/ci/toolchain/linux.yml b/taskcluster/ci/toolchain/linux.yml index de59a053533c..5bc342f9623e 100644 --- a/taskcluster/ci/toolchain/linux.yml +++ b/taskcluster/ci/toolchain/linux.yml @@ -2,7 +2,7 @@ # 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/. -linux64-clang/opt: +linux64-clang: description: "Clang toolchain build" treeherder: kind: build @@ -22,7 +22,7 @@ linux64-clang/opt: - 'build/build-clang/**' - 'taskcluster/scripts/misc/tooltool-download.sh' -linux64-clang-tidy/opt: +linux64-clang-tidy: description: "Clang-tidy build" index: product: static-analysis @@ -46,7 +46,7 @@ linux64-clang-tidy/opt: - 'build/build-clang/**' - 'taskcluster/scripts/misc/tooltool-download.sh' -linux64-gcc/opt: +linux64-gcc: description: "GCC toolchain build" treeherder: kind: build @@ -64,7 +64,7 @@ linux64-gcc/opt: resources: - 'build/unix/build-gcc/**' -linux64-binutils/opt: +linux64-binutils: description: "Binutils toolchain build" treeherder: kind: build @@ -82,7 +82,7 @@ linux64-binutils/opt: resources: - 'build/unix/build-binutils/**' -linux64-cctools-port/opt: +linux64-cctools-port: description: "cctools-port toolchain build" treeherder: kind: build @@ -101,7 +101,7 @@ linux64-cctools-port/opt: resources: - 'taskcluster/scripts/misc/tooltool-download.sh' -linux64-hfsplus/opt: +linux64-hfsplus: description: "hfsplus toolchain build" treeherder: kind: build @@ -121,7 +121,7 @@ linux64-hfsplus/opt: - 'build/unix/build-hfsplus/**' - 'taskcluster/scripts/misc/tooltool-download.sh' -linux64-libdmg/opt: +linux64-libdmg: description: "libdmg-hfsplus toolchain build" treeherder: kind: build diff --git a/taskcluster/ci/toolchain/macosx.yml b/taskcluster/ci/toolchain/macosx.yml index 5e6174ac6494..a3879dcc9cc9 100644 --- a/taskcluster/ci/toolchain/macosx.yml +++ b/taskcluster/ci/toolchain/macosx.yml @@ -2,7 +2,7 @@ # 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/. -macosx64-clang/opt: +macosx64-clang: description: "Clang toolchain build" treeherder: kind: build @@ -22,7 +22,7 @@ macosx64-clang/opt: - 'build/build-clang/**' - 'taskcluster/scripts/misc/tooltool-download.sh' -macosx64-clang-tidy/opt: +macosx64-clang-tidy: description: "Clang-tidy build" index: product: static-analysis @@ -46,7 +46,7 @@ macosx64-clang-tidy/opt: - 'build/build-clang/**' - 'taskcluster/scripts/misc/tooltool-download.sh' -macosx64-cctools-port/opt: +macosx64-cctools-port: description: "cctools-port toolchain build" treeherder: kind: build diff --git a/taskcluster/ci/toolchain/windows.yml b/taskcluster/ci/toolchain/windows.yml index d1ad81783aa7..32a2f758b31c 100644 --- a/taskcluster/ci/toolchain/windows.yml +++ b/taskcluster/ci/toolchain/windows.yml @@ -2,7 +2,7 @@ # 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/. -win32-clang-cl/opt: +win32-clang-cl: description: "Clang-cl toolchain build" treeherder: kind: build @@ -20,7 +20,7 @@ win32-clang-cl/opt: - 'build/build-clang/**' - 'taskcluster/scripts/misc/build-clang-windows-helper32.sh' -win64-clang-cl/opt: +win64-clang-cl: description: "Clang-cl toolchain build" treeherder: kind: build @@ -38,7 +38,7 @@ win64-clang-cl/opt: - 'build/build-clang/**' - 'taskcluster/scripts/misc/build-clang-windows-helper64.sh' -win32-clang-tidy/opt: +win32-clang-tidy: description: "Clang-tidy toolchain build" index: product: static-analysis @@ -59,7 +59,7 @@ win32-clang-tidy/opt: - 'build/build-clang/**' - 'taskcluster/scripts/misc/build-clang-windows-helper32.sh' -win64-clang-tidy/opt: +win64-clang-tidy: description: "Clang-tidy toolchain build" index: product: static-analysis diff --git a/taskcluster/taskgraph/transforms/try_job.py b/taskcluster/taskgraph/transforms/try_job.py new file mode 100644 index 000000000000..e544acffd5e0 --- /dev/null +++ b/taskcluster/taskgraph/transforms/try_job.py @@ -0,0 +1,19 @@ +# 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 + +from taskgraph.transforms.base import TransformSequence + +transforms = TransformSequence() + + +@transforms.add +def set_job_try_name(config, jobs): + """ + For a task which is governed by `-j` in try syntax, set the `job_try_name` + attribute based on the job name. + """ + for job in jobs: + job.setdefault('attributes', {}).setdefault('job_try_name', job['name']) + yield job diff --git a/taskcluster/taskgraph/try_option_syntax.py b/taskcluster/taskgraph/try_option_syntax.py index 7685da9ee5a8..ab4357658ddf 100644 --- a/taskcluster/taskgraph/try_option_syntax.py +++ b/taskcluster/taskgraph/try_option_syntax.py @@ -32,12 +32,6 @@ BUILD_KINDS = set([ 'spidermonkey', ]) -# anything in this list is governed by -j, matching against the `build_platform` attribute -JOB_KINDS_MATCHING_BUILD_PLATFORM = set([ - 'toolchain', - 'android-stuff', -]) - # mapping from shortcut name (usable with -u) to a boolean function identifying # matching test names @@ -595,16 +589,9 @@ class TryOptionSyntax(object): if self.jobs is None or job_try_name in self.jobs: if self.platforms is None or attr('build_platform') not in self.platforms: return True - - if attr('kind') == 'test': + elif attr('kind') == 'test': return match_test(self.unittests, 'unittest_try_name') \ or match_test(self.talos, 'talos_try_name') - elif attr('kind') in JOB_KINDS_MATCHING_BUILD_PLATFORM: - # This will add 'job' tasks to the target set even if no try syntax was specified. - if not self.jobs: - return True - if attr('build_platform') in self.jobs: - return True elif attr('kind') in BUILD_KINDS: if attr('build_type') not in self.build_types: return False