mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix run task
This commit is contained in:
parent
cc488fe538
commit
97e843c4c5
3 changed files with 12 additions and 3 deletions
|
@ -1,6 +1,12 @@
|
|||
#!/bin/sh
|
||||
task_id="$1"
|
||||
artifact="$2"
|
||||
shift 2
|
||||
url="https://queue.taskcluster.net/v1/task/${task_id}/artifacts/${artifact}"
|
||||
echo "Fetching $url"
|
||||
curl \
|
||||
--retry 5 \
|
||||
--connect-timeout 10 \
|
||||
--location
|
||||
https://queue.taskcluster.net/v1/task/$1/artifacts/$2
|
||||
--location \
|
||||
"$url" \
|
||||
"$@"
|
||||
|
|
|
@ -20,7 +20,7 @@ command_prefix = """
|
|||
git checkout {event[after]} &&
|
||||
""".format(event=event)
|
||||
|
||||
def create_task(name, command, artifacts=None, dependencies=None):
|
||||
def create_task(name, command, artifacts=None, dependencies=None, env=None):
|
||||
task_id = taskcluster.slugId()
|
||||
payload = {
|
||||
"taskGroupId": os.environ["DECISION_TASK_ID"],
|
||||
|
@ -45,6 +45,7 @@ def create_task(name, command, artifacts=None, dependencies=None):
|
|||
"-c",
|
||||
command_prefix + command
|
||||
],
|
||||
"env": env or {},
|
||||
"artifacts": {
|
||||
"public/" + artifact_name: {
|
||||
"type": "file",
|
||||
|
@ -68,4 +69,5 @@ create_task(
|
|||
"run task",
|
||||
"./run-task.sh",
|
||||
dependencies=[build_task],
|
||||
env={"BUILD_TASK_ID": build_task},
|
||||
)
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
|
||||
./curl-artifact.sh $BUILD_TASK_ID public/executable.gz -o executable.gz
|
||||
gunzip executable.gz
|
||||
chmod +x executable
|
||||
./executable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue