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

remove license tool #187

Merged
merged 1 commit into from
Jun 10, 2024
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
39 changes: 1 addition & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -683,10 +683,9 @@ FROM sdk-rust as rust-sources
# Copy the sources without clarify.toml or deny.toml, so that validation failures
# don't require a full rebuild from source every time those files are modified.
COPY license-scan /license-scan
COPY license-tool /license-tool

USER root
RUN rm /license-{scan,tool}/{clarify,deny}.toml
RUN rm /license-scan/{clarify,deny}.toml

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=

Expand All @@ -708,15 +707,6 @@ RUN cargo build --release --locked

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=

FROM sdk-cargo as sdk-license-tool

USER builder
WORKDIR /home/builder/license-tool
COPY --from=rust-sources license-tool .
RUN cargo build --release --locked

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=

FROM sdk-cargo as sdk-cargo-deny

ENV DENYVER="0.14.20"
Expand Down Expand Up @@ -765,10 +755,6 @@ COPY --from=sdk-cargo-make \
/home/builder/cargo-make \
/home/builder/cargo-make

COPY --from=sdk-license-tool \
/home/builder/license-tool \
/home/builder/license-tool

COPY --from=sdk-license-scan \
/home/builder/license-scan \
/home/builder/license-scan
Expand All @@ -781,10 +767,6 @@ COPY --chown=0:0 --from=sdk-cargo-make \
/home/builder/cargo-make/target/release/cargo-make \
/usr/libexec/tools/

COPY --chown=0:0 --from=sdk-license-tool \
/home/builder/license-tool/target/release/bottlerocket-license-tool \
/usr/libexec/tools/

COPY --chown=0:0 --from=sdk-license-scan \
/home/builder/license-scan/target/release/bottlerocket-license-scan \
/usr/libexec/tools/
Expand All @@ -801,10 +783,6 @@ COPY --chown=1000:1000 --from=sdk-cargo-make \
/home/builder/cargo-make/LICENSE \
/usr/share/licenses/cargo-make/

COPY --chown=1000:1000 \
COPYRIGHT LICENSE-APACHE LICENSE-MIT \
/usr/share/licenses/bottlerocket-license-tool/

COPY --chown=1000:1000 \
COPYRIGHT LICENSE-APACHE LICENSE-MIT \
/usr/share/licenses/bottlerocket-license-scan/
Expand Down Expand Up @@ -837,20 +815,6 @@ RUN \
/usr/libexec/tools/cargo-deny \
--all-features check --disable-fetch licenses bans sources

WORKDIR /home/builder/license-tool
COPY license-tool/clarify.toml .
RUN \
/usr/libexec/tools/bottlerocket-license-scan \
--clarify clarify.toml \
--spdx-data /usr/libexec/tools/spdx-data \
--out-dir /usr/share/licenses/bottlerocket-license-tool/vendor \
cargo --locked Cargo.toml

COPY license-tool/deny.toml .
RUN \
/usr/libexec/tools/cargo-deny \
--all-features check --disable-fetch licenses bans sources

WORKDIR /home/builder/license-scan
COPY license-scan/clarify.toml .
RUN \
Expand Down Expand Up @@ -1280,7 +1244,6 @@ COPY --chown=0:0 --from=sdk-go-1.22 \
# "sdk-rust-tools" has our attribution generation and license scan tools.
COPY --chown=0:0 --from=sdk-rust-tools /usr/libexec/tools/ /usr/libexec/tools/
COPY --chown=0:0 --from=sdk-rust-tools /usr/share/licenses/bottlerocket-license-scan/ /usr/share/licenses/bottlerocket-license-scan/
COPY --chown=0:0 --from=sdk-rust-tools /usr/share/licenses/bottlerocket-license-tool/ /usr/share/licenses/bottlerocket-license-tool/
COPY --chown=0:0 --from=sdk-rust-tools /usr/share/licenses/cargo-deny/ /usr/share/licenses/cargo-deny/
COPY --chown=0:0 --from=sdk-rust-tools /usr/share/licenses/cargo-make/ /usr/share/licenses/cargo-make/

Expand Down
Loading