-
Notifications
You must be signed in to change notification settings - Fork 15
BuildHook
Marco edited this page Apr 24, 2019
·
3 revisions
The build-hook
command allows you to create or update a Taskcluster hook, using a JSON payload from your target.
Argument | Type | Description | Sample values |
---|---|---|---|
hook_file |
Required path | Path to the Hook definition in the target | path/to/payload.json |
hook_group_id |
Required string | A Taskcluster hook group id | project-XXX |
hook_id |
Required string | A Taskcluster hook id | a-great-hook |
To create and update a hook, you will need the scope related to your <hook_group_id>
and <hook_id>
:
hooks:modify-hook:<hook_group_id>/<hook_id>
The JSON file to store in your target and use with this command needs to match Taskcluster createHook API.
Here is an example payload:
{
"schedule": [
"0 0 * * * *"
],
"metadata": {
"description": "A nice long description",
"name": "A short name",
"owner": "someone@mozilla.com"
},
"task": {
"created": {
"$fromNow": "0 seconds"
},
"deadline": {
"$fromNow": "2 hours"
},
"expires": {
"$fromNow": "1 month"
},
"extra": {},
"metadata": {
"description": "A nice long description",
"name": "A short name",
"owner": "someone@mozilla.com",
"source": "https://github.com/mozilla/my-project"
},
"payload": {
"artifacts": {},
"cache": {},
"capabilities": {},
"command": [
"/hello"
],
"env": {},
"features": {},
"image": "hello-world",
"maxRunTime": 7200
},
"priority": "normal",
"provisionerId": "aws-provisioner-v1",
"retries": 5,
"routes": [
"notify.email.someone@mozilla.com.on-failed"
],
"schedulerId": "-",
"scopes": [
"assume:hook-id:project-XXX/my-project"
],
"tags": {},
"workerType": "taskcluster-generic"
},
"triggerSchema": {
"additionalProperties": true,
"type": "object"
}
}