mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Decision task!
This commit is contained in:
parent
f559fcb5dc
commit
3d12b33e2d
4 changed files with 47 additions and 6 deletions
32
decision-task.py
Normal file
32
decision-task.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
import os
|
||||
import datetime
|
||||
import taskcluster
|
||||
|
||||
task_id = os.environ["DECISION_TASK_ID"] + "-child-task"
|
||||
payload = {
|
||||
"taskGroupId": os.environ["DECISION_TASK_ID"],
|
||||
"provisionerId": "aws-provisioner-v1",
|
||||
"workerType": "github-worker",
|
||||
"created": taskcluster.fromNowJSON(""),
|
||||
"deadline": taskcluster.fromNowJSON("1 hour"),
|
||||
"metadata": {
|
||||
"name": "Taskcluster experiments for Servo: Child task",
|
||||
"description": "",
|
||||
"owner": os.environ["DECISION_TASK_OWNER"],
|
||||
"source": os.environ["DECISION_TASK_SOURCE"],
|
||||
}
|
||||
"payload": {
|
||||
"maxRunTime": 600,
|
||||
"image": "buildpack-deps:bionic-scm",
|
||||
"command": [
|
||||
"/bin/bash", "--login", "-c", """
|
||||
git clone %(DECISION_TASK_CLONE_URL)s repo &&
|
||||
cd repo &&
|
||||
git checkout %(DECISION_TASK_COMMIT_SHA)s &&
|
||||
python2.7 child-task.py
|
||||
""" % os.environ
|
||||
]
|
||||
}
|
||||
}
|
||||
result = taskcluster.Queue().createTask(task_id, payload)
|
||||
print("task created…? %r" % result)
|
Loading…
Add table
Add a link
Reference in a new issue