This commit is contained in:
Simon Sapin 2018-09-12 19:47:26 +02:00
parent 5ccb03cda0
commit 583ab957b8

View file

@ -1,8 +1,9 @@
# coding: utf8 # coding: utf8
import os
import sys
import json import json
import os
import re
import sys
import taskcluster import taskcluster
@ -111,14 +112,17 @@ def create_task(name, command, image, artifacts=None, dependencies=None, env=Non
"command": [ "command": [
"/bin/bash", "/bin/bash",
"--login", "--login",
"-x",
"-e",
"-c", "-c",
""" deindent(
set -e """
set -x git clone $GITHUB_EVENT_CLONE_URL repo
git clone $GITHUB_EVENT_CLONE_URL repo cd repo
cd repo git checkout $GITHUB_EVENT_COMMIT_SHA
git checkout $GITHUB_EVENT_COMMIT_SHA """
""" + command + command
)
], ],
"env": env, "env": env,
"artifacts": { "artifacts": {
@ -137,5 +141,9 @@ def create_task(name, command, image, artifacts=None, dependencies=None, env=Non
return task_id return task_id
def deindent(string):
return re.sub("\n +", "\n ", string)
if __name__ == "__main__": if __name__ == "__main__":
main() main()