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.
This commit is contained in:
commit
d6451f0b33
@ -31,7 +31,7 @@ WORKDIR /build
|
||||
# The `config` config file was a previously generated config file for
|
||||
# the kernel. This file was generated by running `make defconfig`
|
||||
# followed by `make menuconfig` and then enabling the IPv6 protocol page.
|
||||
COPY disabled/aarch64-gnu/config /build/.config
|
||||
COPY aarch64-gnu/config /build/.config
|
||||
RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.42.tar.xz | \
|
||||
tar xJf - && \
|
||||
cd /build/linux-4.4.42 && \
|
||||
|
@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
# emscripten
|
||||
COPY scripts/emscripten-wasm.sh /scripts/
|
||||
COPY disabled/wasm32-exp/node.sh /usr/local/bin/node
|
||||
COPY wasm32-exp/node.sh /usr/local/bin/node
|
||||
RUN bash /scripts/emscripten-wasm.sh
|
||||
|
||||
# cache
|
||||
|
@ -36,12 +36,14 @@ elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
|
||||
echo Cannot run disabled images on travis!
|
||||
exit 1
|
||||
fi
|
||||
retry docker \
|
||||
# retry messes with the pipe from tar to docker. Not needed on non-travis
|
||||
# Transform changes the context of disabled Dockerfiles to match the enabled ones
|
||||
tar --transform 's#^./disabled/#./#' -C $docker_dir -c . | docker \
|
||||
build \
|
||||
--rm \
|
||||
-t rust-ci \
|
||||
-f "$docker_dir/disabled/$image/Dockerfile" \
|
||||
"$docker_dir"
|
||||
-f "$image/Dockerfile" \
|
||||
-
|
||||
else
|
||||
echo Invalid image: $image
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user