Pin nightly rust for more controlled updating

This commit is contained in:
Michael Vines 2018-08-20 09:59:26 -07:00
parent ecddff98f5
commit a1ec549630
3 changed files with 27 additions and 5 deletions

View File

@ -1,8 +1,9 @@
FROM solanalabs/rust FROM solanalabs/rust
ARG nightly=nightly-2018-08-14
RUN set -x && \ RUN set -x && \
rustup install nightly && \ rustup install $nightly && \
rustup default nightly && \ rustup default $nightly && \
rustup component add clippy-preview --toolchain=nightly && \ rustup component add clippy-preview --toolchain=$nightly && \
rustc --version && \ rustc --version && \
cargo --version cargo --version

View File

@ -1,6 +1,21 @@
Docker image containing rust nightly and some preinstalled crates used in CI. Docker image containing rust nightly and some preinstalled crates used in CI.
This image may be manually updated by running `./build.sh` if you are a member This image may be manually updated by running `CI=true ./build.sh` if you are a member
of the [Solana Labs](https://hub.docker.com/u/solanalabs/) Docker Hub of the [Solana Labs](https://hub.docker.com/u/solanalabs/) Docker Hub
organization, but it is also automatically updated periodically by organization, but it is also automatically updated periodically by
[this automation](https://buildkite.com/solana-labs/solana-ci-docker-rust-nightly). [this automation](https://buildkite.com/solana-labs/solana-ci-docker-rust-nightly).
## Moving to a newer nightly
We pin the version of nightly (see the `ARG nightly=xyz` line in `Dockerfile)
to avoid the build breaking at unexpected times, as occasionally nightly will
introduce breaking changes.
To update the pinned version:
1. Locally update the `ARG nightly=xyz` line in `ci/docker-rust-nightly/Dockerfile`
1. Run `ci/docker-rust-nightly/build.sh` to rebuild the nightly image locally
1. Run `ci/docker-run.sh --nopull solanalabs/rust-nightly ci/test-nightly.sh` to
confirm the new nightly image builds. Fix any issues as needed
1. Run `CI=true ci/docker-rust-nightly/build.sh` to push the new nightly image to dockerhub.com.
**Note that all CI may be broken now until the next step is completed.**
1. Merge the update to `ARG nightly=xyz` and any codebase adjustments needed.

View File

@ -3,4 +3,10 @@
cd "$(dirname "$0")" cd "$(dirname "$0")"
docker build -t solanalabs/rust-nightly . docker build -t solanalabs/rust-nightly .
docker push solanalabs/rust-nightly
maybeEcho=
if [[ -z $CI ]]; then
echo "Not CI, skipping |docker push|"
maybeEcho="echo"
fi
$maybeEcho docker push solanalabs/rust-nightly