public class TaskTemplate extends Object
Definition of a task embedded in a hook
See http://schemas.taskcluster.net/hooks/v1/task-template.json#
| Modifier and Type | Class and Description |
|---|---|
class |
TaskTemplate.Metadata
Required task metadata
|
| Modifier and Type | Field and Description |
|---|---|
Object |
extra
Object with properties that can hold any kind of extra data that should be associated with the task.
|
TaskTemplate.Metadata |
metadata |
Object |
payload
Task-specific payload following worker-specific format.
|
String |
priority
Priority of task, this defaults to
normal. |
String |
provisionerId
Unique identifier for a provisioner, that can supply specified
workerType |
int |
retries
Number of times to retry the task in case of infrastructure issues.
|
String[] |
routes
List of task specific routes, AMQP messages will be CC’ed to these routes.
|
String |
schedulerId
Identifier for the scheduler that defined this task, this can be an identifier for a user or a service like the
"task-graph-scheduler". |
String[] |
scopes
List of scopes (or scope-patterns) that the task is authorized to use.
|
Object |
tags
Arbitrary key-value tags (only strings limited to 4k).
|
String |
taskGroupId
Identifier for a group of tasks scheduled together with this task, by scheduler identified by
schedulerId. |
String |
workerType
Unique identifier for a worker-type within a specific provisioner
|
| Constructor and Description |
|---|
TaskTemplate() |
public Object extra
Object with properties that can hold any kind of extra data that should be associated with the task. This can be data for the task which doesn’t fit into payload, or it can supplementary data for use in services listening for events from this task. For example this could be details to display on treeherder, or information for indexing the task. Please, try to put all related information under one property, so extra data keys for treeherder reporting and task indexing don’t conflict, hence, we have reusable services. Warning, do not stuff large data-sets in here, task definitions should not take-up multiple MiBs.
public TaskTemplate.Metadata metadata
public Object payload
Task-specific payload following worker-specific format. For example the docker-worker requires keys like: image, commands and features. Refer to the documentation of docker-worker for details.
public String priority
Priority of task, this defaults to normal. Additional levels may be added later. Task submitter required scopes queue:task-priority:high for high priority tasks.
public String provisionerId
Unique identifier for a provisioner, that can supply specified workerType
public int retries
Number of times to retry the task in case of infrastructure issues. An infrastructure issue is a worker node that crashes or is shutdown, these events are to be expected.
public String[] routes
List of task specific routes, AMQP messages will be CC’ed to these routes. Task submitter required scopes queue:route:<route> for each route given.
public String schedulerId
Identifier for the scheduler that defined this task, this can be an identifier for a user or a service like the "task-graph-scheduler". Task submitter required scopes queue:assume:scheduler-id:<schedulerId>/<taskGroupId>. This scope is also necessary to schedule a defined task, or rerun a task.
public String[] scopes
List of scopes (or scope-patterns) that the task is authorized to use.
public Object tags
Arbitrary key-value tags (only strings limited to 4k). These can be used to attach informal meta-data to a task. Use this for informal tags that tasks can be classified by. You can also think of strings here as candidates for formal meta-data. Something like purpose: 'build' || 'test' is a good example.
public String taskGroupId
Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId. Defaults to taskId if property isn’t specified.
public String workerType
Unique identifier for a worker-type within a specific provisioner
Copyright © 2014–2015 Mozilla. All rights reserved.