-
-
Save jonasfj/7ea646ae8e01d56c21f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var taskcluster = require('taskcluster-client'); | |
var slugid = require('slugid'); | |
var queue = new taskcluster.Queue(); | |
var taskIdA = slugid.v4(); | |
var taskIdB = slugid.v4(); | |
queue.defineTask(taskIdA, { | |
"provisionerId": "aws-provisioner", | |
"workerType": "gaia", | |
"created": taskcluster.fromNowJSON(), | |
"deadline": taskcluster.fromNowJSON('3 hours'), | |
"payload": { | |
"image": "ubuntu:13.10", | |
"command": [ | |
"/bin/bash", | |
"-c", | |
"echo \"hello World\"" | |
], | |
"maxRunTime": 600 | |
}, | |
"extra": { | |
"waitFor": [] | |
}, | |
"metadata": { | |
"name": "Example Task", | |
"description": "Markdown description of **what** this task does", | |
"owner": "name@example.com", | |
"source": "http://tools.taskcluster.net/task-creator/" | |
} | |
}); | |
queue.defineTask(taskIdB, { | |
"provisionerId": "aws-provisioner", | |
"workerType": "gaia", | |
"created": taskcluster.fromNowJSON(), | |
"deadline": taskcluster.fromNowJSON('3 hours'), | |
"payload": { | |
"image": "ubuntu:13.10", | |
"command": [ | |
"/bin/bash", | |
"-c", | |
"echo \"hello World\"" | |
], | |
"maxRunTime": 600 | |
}, | |
"extra": { | |
"waitFor": [taskIdA] | |
}, | |
"metadata": { | |
"name": "Example Task", | |
"description": "Markdown description of **what** this task does", | |
"owner": "name@example.com", | |
"source": "http://tools.taskcluster.net/task-creator/" | |
} | |
}); | |
console.log("taskIdA: " + taskIdA); | |
console.log("taskIdB: " + taskIdB); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment