aboutsummaryrefslogtreecommitdiffstats
path: root/etc/taskcluster/decisionlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'etc/taskcluster/decisionlib.py')
-rw-r--r--etc/taskcluster/decisionlib.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/etc/taskcluster/decisionlib.py b/etc/taskcluster/decisionlib.py
index 93a5f3a8706..0436612dafa 100644
--- a/etc/taskcluster/decisionlib.py
+++ b/etc/taskcluster/decisionlib.py
@@ -57,6 +57,15 @@ class Config:
self.git_ref = os.environ.get("GIT_REF")
self.git_sha = os.environ.get("GIT_SHA")
+ root_url = os.environ.get("TASKCLUSTER_ROOT_URL")
+ self.legacy_tc_deployment = root_url == "https://taskcluster.net"
+
+ if self.legacy_tc_deployment:
+ self.default_provisioner_id = "aws-provisioner-v1"
+ else: # pragma: no cover
+ self.default_provisioner_id = "proj-example"
+
+
def task_id(self):
if hasattr(self, "_task_id"):
return self._task_id
@@ -131,7 +140,7 @@ class Task:
self.name = name
self.description = ""
self.scheduler_id = "taskcluster-github"
- self.provisioner_id = "aws-provisioner-v1"
+ self.provisioner_id = CONFIG.default_provisioner_id
self.worker_type = "github-worker"
self.deadline_in = "1 day"
self.expires_in = "1 year"
@@ -755,24 +764,24 @@ class DockerWorkerTask(UnixTaskMixin, Task):
.with_index_and_artifacts_expire_in(CONFIG.docker_images_expire_in)
.with_features("dind")
.with_env(DOCKERFILE=dockerfile_contents)
- .with_artifacts("/image.tar.lz4")
+ .with_artifacts("/image.tar")
.with_script("""
echo "$DOCKERFILE" | docker build -t taskcluster-built -
- docker save taskcluster-built | lz4 > /image.tar.lz4
+ docker save taskcluster-built > /image.tar
""")
.with_docker_image(
# https://github.com/servo/taskcluster-bootstrap-docker-images#image-builder
"servobrowser/taskcluster-bootstrap:image-builder@sha256:" \
"0a7d012ce444d62ffb9e7f06f0c52fedc24b68c2060711b313263367f7272d9d"
)
- .find_or_create("docker-image." + digest)
+ .find_or_create("docker-image-uncompressed." + digest)
)
return self \
.with_dependencies(image_build_task) \
.with_docker_image({
"type": "task-image",
- "path": "public/image.tar.lz4",
+ "path": "public/image.tar",
"taskId": image_build_task,
})