Ensure all tasks started from decision_task.py are on Treeherder.

This commit is contained in:
Simon Sapin 2018-12-13 11:04:17 +01:00
parent 1ec78c065a
commit 4cd200dd61
2 changed files with 32 additions and 11 deletions

View file

@ -5,10 +5,15 @@
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import os.path
from decisionlib import *
import decisionlib
from decisionlib import CONFIG, SHARED
def main(task_for):
assert CONFIG.git_ref.startswith("refs/heads/")
branch = CONFIG.git_ref[len("refs/heads/"):]
CONFIG.treeherder_repository_names.append("servo-" + branch)
if task_for == "github-push":
# FIXME https://github.com/servo/servo/issues/22325 implement these:
macos_wpt = magicleap_dev = linux_arm32_dev = linux_arm64_dev = \
@ -56,9 +61,6 @@ def main(task_for):
android_x86_wpt
],
}
assert CONFIG.git_ref.startswith("refs/heads/")
branch = CONFIG.git_ref[len("refs/heads/"):]
CONFIG.treeherder_repository_names.append("servo-" + branch)
for function in by_branch_name.get(branch, []):
function()
@ -74,7 +76,7 @@ def mocked_only():
windows_release()
linux_wpt()
android_x86_wpt()
linux_build_task("Indexed by task definition").find_or_create()
decisionlib.DockerWorkerTask("Indexed by task definition").find_or_create()
ping_on_daily_task_failure = "SimonSapin, nox, emilio"
@ -141,7 +143,7 @@ def linux_tidy_unit_docs():
def upload_docs():
docs_build_task_id = Task.find("docs." + CONFIG.git_sha)
docs_build_task_id = decisionlib.Task.find("docs." + CONFIG.git_sha)
return (
linux_task("Upload docs to GitHub Pages")
.with_treeherder("Linux x64", "DocUpload")
@ -187,7 +189,8 @@ def with_rust_nightly():
modified_build_env["RUSTFLAGS"] = " ".join(flags)
return (
linux_build_task("Linux x64: with Rust Nightly", build_env=modified_build_env)
linux_build_task("with Rust Nightly", build_env=modified_build_env)
.with_treeherder("Linux x64", "RustNightly")
.with_script("""
echo "nightly" > rust-toolchain
./mach build --dev
@ -239,7 +242,7 @@ def android_x86_release():
def android_x86_wpt():
build_task = android_x86_release()
return (
DockerWorkerTask("WPT")
linux_task("WPT")
.with_treeherder("Android x86")
.with_provisioner_id("proj-servo")
.with_worker_type("docker-worker-kvm")
@ -402,18 +405,28 @@ def dockerfile_path(name):
def linux_task(name):
return DockerWorkerTask(name).with_worker_type("servo-docker-worker")
return (
decisionlib.DockerWorkerTask(name)
.with_worker_type("servo-docker-worker")
.with_treeherder_required()
)
def windows_task(name):
return WindowsGenericWorkerTask(name).with_worker_type("servo-win2016")
return (
decisionlib.WindowsGenericWorkerTask(name)
.with_worker_type("servo-win2016")
.with_treeherder_required()
)
def macos_task(name):
return (
MacOsGenericWorkerTask(name)
decisionlib.MacOsGenericWorkerTask(name)
.with_provisioner_id("proj-servo")
.with_worker_type("macos")
.with_treeherder_required()
)