public class WorkerAction extends Object
Actions provide a generic mechanism to expose additional features of a provisioner, worker type, or worker to Taskcluster clients.
An action is comprised of metadata describing the feature it exposes, together with a webhook for triggering it.
The Taskcluster tools site, for example, retrieves actions when displaying provisioners, worker types and workers. It presents the provisioner/worker type/worker specific actions to the user. When the user triggers an action, the web client takes the registered webhook, substitutes parameters into the URL (see url
), signs the requests with the Taskcluster credentials of the user operating the web interface, and issues the HTTP request.
The level to which the action relates (provisioner, worker type, worker) is called the action context. All actions, regardless of the action contexts, are registered against the provisioner when calling queue.declareProvisioner
.
The action context is used by the web client to determine where in the web interface to present the action to the user as follows:
context |
Tool where action is displayed |
---|---|
provisioner | Provisioner Explorer |
worker-type | Workers Explorer |
worker | Worker Explorer |
See actions docs for more information.
See https://schemas.taskcluster.net/queue/v1/worker-response.json#/properties/actions/items
Modifier and Type | Field and Description |
---|---|
String |
context
Only actions with the context
worker are included. |
String |
description
Description of the provisioner.
|
String |
method
Method to indicate the desired action to be performed for a given resource.
|
String |
name
Short names for things like logging/error messages.
|
Object |
title
Appropriate title for any sort of Modal prompt.
|
String |
url
When an action is triggered, a request is made using the
url and method . |
Constructor and Description |
---|
WorkerAction() |
public String context
Only actions with the context worker
are included.
Possible values: * “worker”
public String description
Description of the provisioner.
public String method
Method to indicate the desired action to be performed for a given resource.
Possible values: * “POST” * “PUT” * “DELETE” * “PATCH”
public String name
Short names for things like logging/error messages.
public Object title
Appropriate title for any sort of Modal prompt.
public String url
When an action is triggered, a request is made using the url
and method
. Depending on the context
, the following parameters will be substituted in the url:
context |
Path parameters |
---|---|
provisioner | |
worker-type | |
worker |
Note: The request needs to be signed with the user’s Taskcluster credentials.
Copyright © 2014–2018 Mozilla. All rights reserved.