Skip to content

Commit d6451f0

Browse files
Rollup merge of #44903 - kallisti5:ci-build-disabled, r=aidanhs
ci: Fix building disabled containers * Change the context into the disabled directory. Now you can test containers which are disabled.
2 parents 4489a7a + 3457a22 commit d6451f0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Diff for: src/ci/docker/disabled/aarch64-gnu/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ WORKDIR /build
3131
# The `config` config file was a previously generated config file for
3232
# the kernel. This file was generated by running `make defconfig`
3333
# followed by `make menuconfig` and then enabling the IPv6 protocol page.
34-
COPY disabled/aarch64-gnu/config /build/.config
34+
COPY aarch64-gnu/config /build/.config
3535
RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.42.tar.xz | \
3636
tar xJf - && \
3737
cd /build/linux-4.4.42 && \

Diff for: src/ci/docker/disabled/wasm32-exp/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1717

1818
# emscripten
1919
COPY scripts/emscripten-wasm.sh /scripts/
20-
COPY disabled/wasm32-exp/node.sh /usr/local/bin/node
20+
COPY wasm32-exp/node.sh /usr/local/bin/node
2121
RUN bash /scripts/emscripten-wasm.sh
2222

2323
# cache

Diff for: src/ci/docker/run.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
3636
echo Cannot run disabled images on travis!
3737
exit 1
3838
fi
39-
retry docker \
39+
# retry messes with the pipe from tar to docker. Not needed on non-travis
40+
# Transform changes the context of disabled Dockerfiles to match the enabled ones
41+
tar --transform 's#^./disabled/#./#' -C $docker_dir -c . | docker \
4042
build \
4143
--rm \
4244
-t rust-ci \
43-
-f "$docker_dir/disabled/$image/Dockerfile" \
44-
"$docker_dir"
45+
-f "$image/Dockerfile" \
46+
-
4547
else
4648
echo Invalid image: $image
4749
exit 1

0 commit comments

Comments
 (0)