Skip to content

Commit

Permalink
Merge pull request #187 from bcressey/rm-license-tool
Browse files Browse the repository at this point in the history
remove license tool
  • Loading branch information
bcressey authored Jun 10, 2024
2 parents c02fa67 + 6ed08f2 commit c35d7b3
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 1,805 deletions.
39 changes: 1 addition & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,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 @@ -706,15 +705,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 @@ -763,10 +753,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 @@ -779,10 +765,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 @@ -799,10 +781,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 @@ -835,20 +813,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 @@ -1275,7 +1239,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

0 comments on commit c35d7b3

Please sign in to comment.