Skip to content

Commit

Permalink
fix broken release due to wrong rust version and resolver conflit, re…
Browse files Browse the repository at this point in the history
…move the dockerfile caching as it is not used anyway. (#4331)

builds to fail:
https://buildkite.com/nearprotocol/nearcore-release/builds/601

Created a build to verify if it works as a quick fix to unblock master failing: https://buildkite.com/nearprotocol/nearcore-release/builds/607

As well remove the mount=type=cache as they get removed eitherways every time once we destroy the container, so there aren't useful at all here.
  • Loading branch information
chefsale authored May 28, 2021
1 parent b2f283a commit 928f15d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,13 @@ COPY . .
ENV CARGO_TARGET_DIR=/tmp/target
ENV RUSTC_FLAGS='-C target-cpu=x86-64'
ENV PORTABLE=ON
RUN --mount=type=cache,target=/tmp/target \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/usr/local/cargo/registry \
cargo +"$(cat /tmp/rust-toolchain)" build -p neard --release && \
RUN cargo +"$(cat /tmp/rust-toolchain)" build -p neard --release && \
mkdir /tmp/build && \
cd /tmp/target/release && \
mv ./neard /tmp/build

COPY scripts/run_docker.sh /tmp/build/run.sh


# Actual image
FROM ubuntu:18.04

Expand Down
5 changes: 1 addition & 4 deletions Dockerfile.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ COPY . .
ENV CARGO_TARGET_DIR=/tmp/target
ENV RUSTC_FLAGS='-C target-cpu=x86-64'
ENV PORTABLE=ON
RUN --mount=type=cache,target=/tmp/target \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/usr/local/cargo/registry \
cargo +"$(cat /tmp/rust-toolchain)" build -p neard --release --features nightly_protocol --features nightly_protocol_features && \
RUN cargo +"$(cat /tmp/rust-toolchain)" build -p neard --release --features nightly_protocol --features nightly_protocol_features && \
mkdir /tmp/build && \
cd /tmp/target/release && \
mv ./neard /tmp/build
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
docker-nearcore:
DOCKER_BUILDKIT=1 docker build -t nearcore -f Dockerfile .
DOCKER_BUILDKIT=1 docker build -t nearcore -f Dockerfile --progress=plain .

docker-nearcore-nightly:
DOCKER_BUILDKIT=1 docker build -t nearcore-nightly -f Dockerfile.nightly .
DOCKER_BUILDKIT=1 docker build -t nearcore-nightly -f Dockerfile.nightly --progress=plain .

RUST_OPTIONS:=+stable
RUST_OPTIONS:=$(cat rust-toolchain)

export RUSTFLAGS = -D warnings

Expand Down

0 comments on commit 928f15d

Please sign in to comment.