Skip to content

Commit

Permalink
Fix cargo install when yanked dependency (#1995)
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam authored Oct 23, 2022
1 parent a47459f commit 261fa88
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def build_dockerfile(
rust_commands += ["rustup component add clippy"]
keep_rustup = True
if len(cargo_packages) > 0:
cargo_cmd = "cargo install " + " ".join(
cargo_cmd = "cargo install --force --locked " + " ".join(
list(dict.fromkeys(cargo_packages))
)
rust_commands += [cargo_cmd]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& rustup component add clippy && cargo install sarif-fmt shellcheck-sarif \
&& rustup component add clippy && cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/ci_light/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
4 changes: 2 additions & 2 deletions flavors/cupcake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ RUN npm --no-cache install --ignore-scripts \
&& find . -name "README.md" -delete \
&& find . -name ".package-lock.json" -delete \
&& find . -name "package-lock.json" -delete \
&& find . -name "README.md" -delete
&& find . -name "README.md" -delete
WORKDIR /

#NPM__END
Expand Down Expand Up @@ -236,7 +236,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& rustup component add clippy && cargo install sarif-fmt shellcheck-sarif \
&& rustup component add clippy && cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/documentation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/javascript/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/ruby/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& rustup component add clippy && cargo install sarif-fmt shellcheck-sarif \
&& rustup component add clippy && cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/salesforce/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/security/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/swift/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion flavors/terraform/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ RUN echo 'gem: --no-document' >> ~/.gemrc && \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install sarif-fmt shellcheck-sarif \
&& cargo install --force --locked sarif-fmt shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down
2 changes: 1 addition & 1 deletion linters/bash_shellcheck/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \
#CARGO__START
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable \
&& export PATH="/root/.cargo/bin:${PATH}" \
&& cargo install shellcheck-sarif \
&& cargo install --force --locked shellcheck-sarif \
&& rm -rf /root/.cargo/registry /root/.cargo/git /root/.cache/sccache /root/.rustup
ENV PATH="/root/.cargo/bin:${PATH}"
#CARGO__END
Expand Down

0 comments on commit 261fa88

Please sign in to comment.