refactor: Create SigningDriver and CiDriver (#197)

This also includes a new `login` command. The signing and CI logic is now using the Driver trait system along with a new experimental sigstore signing driver. New static macros have also been created to make implementation management easier for `Command` usage and `Driver` trait implementation calls.

---------

Co-authored-by: xyny <60004820+xynydev@users.noreply.github.com>
This commit is contained in:
Gerald Pinder 2024-08-12 23:52:07 -04:00 committed by GitHub
parent 3ecb0d3d93
commit 8ce83ba7ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 6468 additions and 2083 deletions

View file

@ -16,7 +16,6 @@ build:
WAIT
BUILD --platform=linux/amd64 --platform=linux/arm64 +build-scripts
END
BUILD +run-checks
BUILD --platform=linux/amd64 --platform=linux/arm64 +build-images
run-checks:
@ -34,15 +33,19 @@ prebuild:
lint:
FROM +common
DO rust+CARGO --args="clippy -- -D warnings"
DO rust+CARGO --args="clippy --all-features -- -D warnings"
DO rust+CARGO --args="clippy --no-default-features -- -D warnings"
RUN cargo fmt --check
DO rust+CARGO --args="clippy"
DO rust+CARGO --args="clippy --all-features"
DO rust+CARGO --args="clippy --no-default-features"
test:
FROM +common
DO rust+CARGO --args="test -- --show-output"
DO rust+CARGO --args="test --all-features -- --show-output"
DO rust+CARGO --args="test --no-default-features -- --show-output"
COPY --dir test-files/ integration-tests/ /app
COPY +cosign/cosign /usr/bin/cosign
DO rust+CARGO --args="test --workspace -- --show-output"
DO rust+CARGO --args="test --workspace --all-features -- --show-output"
DO rust+CARGO --args="test --workspace --no-default-features -- --show-output"
install:
FROM +common
@ -64,7 +67,7 @@ common:
FROM --platform=native ghcr.io/blue-build/earthly-lib/cargo-builder
WORKDIR /app
COPY --keep-ts --dir src/ template/ recipe/ utils/ /app
COPY --keep-ts --dir src/ template/ recipe/ utils/ process/ /app
COPY --keep-ts Cargo.* /app
COPY --keep-ts *.md /app
COPY --keep-ts LICENSE /app