Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust qs set cargo tools versions and no compile but get bins #989

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

### Modified
- Remove nodejs12 form the code ([#936](https://github.com/opendevstack/ods-quickstarters/issues/936))
- Rust Quickstarter Jenkins Agent CICD tools with fixed versions ([#988](https://github.com/opendevstack/ods-quickstarters/issues/988))

### Fixed
- Maintenance for Golang Agent and QuickStarter ([#955](https://github.com/opendevstack/ods-quickstarters/issues/955))
Expand Down
14 changes: 13 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,16 @@ RUN cd /tmp && \
cd rust-${rustVersion}-${rustToolchain} && \
./install.sh && \
cargo -V && \
cargo install cargo-nextest cargo-llvm-cov cargo-generate
mkdir -p $HOME/.cargo/bin && \
# 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-$rustToolchain.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-$rustToolchain.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-$rustToolchain.tar.gz | tar xzf - -C "$HOME/.cargo/bin" && \
# cargo LLVM coverage crate is recommended to be compiled as it takes care to add the OS lib dependencies the proper way
cargo install cargo-llvm-cov --version $CARGO_LLVM_COV_VERSION && \
cargo nextest --version && \
cargo llvm-cov --version && \
cargo generate --version

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