Skip to content

Commit

Permalink
rust qs set cargo tools versions and no compile but get bins
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardcl committed Feb 1, 2024
1 parent 6af1164 commit 02d556a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion common/jenkins-agents/rust/docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ ARG rustToolchain

ENV PATH="$HOME/.cargo/bin:$PATH"
ENV USER="rust-agent"
ENV CARGO_NEXTEST_VERSION=0.9.67 \
CARGO_LLVM_COV_VERSION=0.6.4 \
CARGO_GENERATE_VERSION=0.19.0

RUN yum install -y binutils cpp gcc glibc-devel glibc-headers isl kernel-headers libasan libatomic libgomp libmpc libpkgconf libubsan libxcrypt-devel llvm-libs pkgconf pkgconf-m4 pkgconf-pkg-config openssl-devel

Expand All @@ -17,7 +20,13 @@ RUN cd /tmp && \
cd rust-${rustVersion}-${rustToolchain} && \
./install.sh && \
cargo -V && \
cargo install cargo-nextest cargo-llvm-cov cargo-generate
# Download binaries and install to $HOME/.cargo/bin
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-$CARGO_NEXTEST_VERSION/cargo-nextest-$CARGO_NEXTEST_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C "$HOME/.cargo/bin" && \
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/taiki-e/cargo-llvm-cov/releases/download/v$CARGO_LLVM_COV_VERSION/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C "$HOME/.cargo/bin" && \
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/cargo-generate/cargo-generate/releases/download/v$CARGO_GENERATE_VERSION/cargo-generate-v$CARGO_GENERATE_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C "$HOME/.cargo/bin" && \
cargo-nextest-nextest --version && \
cargo llvm-cov --version && \
cargo generate-generate --version

RUN chgrp -R 0 $HOME/.cargo && \
chmod -R g=u $HOME/.cargo

0 comments on commit 02d556a

Please sign in to comment.