Use the docker image we just built

This commit is contained in:
Simon Sapin 2018-09-10 18:50:49 +02:00
parent b72d5ca2a7
commit 8e7d83206f
3 changed files with 15 additions and 5 deletions

View file

@ -3,9 +3,6 @@
set -e
set -x
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
export PATH="$HOME/.cargo/bin:$PATH"
cd something-rust
cargo build --release
gzip -c target/release/something-rust > something-rust.gz

View file

@ -69,19 +69,31 @@ def create_task(name, command, artifacts=None, dependencies=None, env=None, cach
print("Scheduled %s: %s" % (name, task_id))
return task_id
create_task(
image_build_task = create_task(
"docker image build task",
"./docker-image-build-task.sh servo-x86_64-linux",
image="buildpack-deps:trusty-scm",
features={
"dind": True, # docker-in-docker
},
artifacts=[
("image.tar.gz", "/image.tar.gz"),
],
)
build_task = create_task(
"build task",
"./build-task.sh",
artifacts=[("executable.gz", "/repo/something-rust/something-rust.gz")],
dependencies=[image_build_task],
image={
"type": "task-image",
"taskId": image_build_task,
"path": "public/image.tar.gz",
},
artifacts=[
("executable.gz", "/repo/something-rust/something-rust.gz"),
],
# https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches
# For this to be allowed, I created role

View file

@ -9,3 +9,4 @@ apt-get update -q
apt-get install -qy --no-install-recommends docker.io
docker version
./docker/build.sh "$image"
docker save "$image" | gzip > /image.tar.gz