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

refactor: Create SigningDriver and CiDriver #197

Merged
merged 91 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
35be41d
feat(init): Add the new/init subcommands
gmpinder Feb 25, 2024
3db2762
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Feb 25, 2024
f55d98d
Cleaning up Cargo.toml
gmpinder Feb 25, 2024
2f5d91d
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Mar 2, 2024
b3113f7
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Mar 5, 2024
aee2e84
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Mar 19, 2024
f498629
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Apr 12, 2024
0d5d3f3
Merge branch 'main' into 34-feat-finish-init-command
gmpinder May 27, 2024
8503441
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Jun 3, 2024
30d2f04
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Jun 26, 2024
d59b968
Go back to basics
gmpinder Jun 28, 2024
ae5a2a9
Start work on the SigningDriver
gmpinder Jun 28, 2024
5b4e4d3
Template README
gmpinder Jun 29, 2024
5e3f1ef
Add initial commit
gmpinder Jun 30, 2024
0df9490
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Jun 30, 2024
d4b1629
Rework driver usage
gmpinder Jul 1, 2024
2051d0b
Move traits into their own file
gmpinder Jul 5, 2024
88980bc
Merge branch 'main' into 34-feat-finish-init-command
gmpinder Jul 5, 2024
33ab9ac
Remove init work
gmpinder Jul 5, 2024
47be2f1
Use RwLock
gmpinder Jul 6, 2024
75b577f
Merge branch 'main' into signing-driver
gmpinder Jul 6, 2024
bb253cb
Add login method
gmpinder Jul 15, 2024
c9a81ed
Sign into cosign
gmpinder Jul 15, 2024
26f31ed
refactor: Create CiDriver (#199)
gmpinder Jul 15, 2024
23c7ac2
Merge branch 'main' into signing-driver
gmpinder Jul 26, 2024
85d4002
Rework credentials
gmpinder Jul 15, 2024
f978a4e
Add back lowercase
gmpinder Jul 15, 2024
c256495
Remove unused code
gmpinder Jul 15, 2024
81e2188
Move drivers, logging, and signal handling to own crate
gmpinder Jul 16, 2024
8af1880
Fix helix config
gmpinder Jul 16, 2024
396c4cf
Update Earthfile
gmpinder Jul 16, 2024
0b196d0
Consolidate logic more
gmpinder Jul 18, 2024
dd4b79f
Fix unit tests
gmpinder Jul 18, 2024
d1ee222
Clean up dependencies
gmpinder Jul 18, 2024
b3a7afb
Some optimizations
gmpinder Jul 19, 2024
f79db5c
Abstract logic for signing
gmpinder Jul 20, 2024
24f4a5e
Create new Command macro
gmpinder Jul 21, 2024
e99f3f0
Add macros module
gmpinder Jul 21, 2024
94f2fa7
Replace use of Command with macro
gmpinder Jul 21, 2024
7b14594
Start on sign function
gmpinder Jul 21, 2024
2893c2f
Finish docker signing driver
gmpinder Jul 23, 2024
3590ab4
Remove grouping
gmpinder Jul 23, 2024
668e56e
Call with COSIGN_PRIVATE_KEY
gmpinder Jul 23, 2024
ee7aead
Mount workspace
gmpinder Jul 23, 2024
b8bffc0
Add way to match user's uid and gid
gmpinder Jul 23, 2024
38e0399
Remove $ from docker creds root
gmpinder Jul 23, 2024
8c45b9b
find correct path for creds
gmpinder Jul 23, 2024
d6ad16c
Make adjustments to credentials mounting
gmpinder Jul 24, 2024
3d6b657
Fix intermittent test failures
gmpinder Jul 24, 2024
bb746c1
Don't allow no cosign check
gmpinder Jul 24, 2024
fab1555
Start using sigstore crate
gmpinder Jul 28, 2024
e23c1bc
make some progress with implementing sigstore
gmpinder Jul 28, 2024
90dd726
stuck on as_ref error
gmpinder Jul 28, 2024
5a6d291
Add method to get private key contents
gmpinder Jul 29, 2024
428520a
Fix borrow checker issues
gmpinder Jul 29, 2024
3cf246d
Finish signing function
gmpinder Jul 29, 2024
992c917
Use help text
gmpinder Jul 30, 2024
143dcbc
Switch to using an opts struct
gmpinder Aug 3, 2024
5809c50
fix: add typespec schemas for cli modules, remove modules.json (not n…
xynydev Jul 27, 2024
517d460
chore: Switch from askama to rinja
gmpinder Aug 3, 2024
ab888dc
Finish verify function
gmpinder Aug 3, 2024
72797b0
Test using sigstore signer
gmpinder Aug 3, 2024
91535ec
Update process/drivers/traits.rs
gmpinder Aug 3, 2024
01a47b9
Fix sigstore features to use rustls instead of native tls
gmpinder Aug 3, 2024
ba20519
Found bug in sigstore, use patch for now
gmpinder Aug 4, 2024
a4eb689
Add some test files for sigstore and cosign
gmpinder Aug 4, 2024
bf23a7b
Add some test files for sigstore and cosign
gmpinder Aug 4, 2024
dea3d06
Change how we create the private key signer
gmpinder Aug 4, 2024
12e29b6
Update lockfile
gmpinder Aug 4, 2024
9b4ef58
Install cosign in test target
gmpinder Aug 4, 2024
3db89c6
Switch to using the tokio runtime
gmpinder Aug 4, 2024
d7de5ad
Enable all features for tokio runtime
gmpinder Aug 4, 2024
a055aca
Remove the inline runtime
gmpinder Aug 4, 2024
cc0aea0
Add compatibility tests
gmpinder Aug 7, 2024
6a4d565
feat: Create login command
gmpinder Aug 6, 2024
ce35f8a
fix: Stop buildah from hanging
gmpinder Aug 10, 2024
b056609
Merge branch 'main' into signing-driver
gmpinder Aug 10, 2024
a6c9ddb
Put sigstore driver behind feature flag
gmpinder Aug 11, 2024
bff3703
Merge branch 'main' into signing-driver
gmpinder Aug 11, 2024
aac434e
Don't override path
gmpinder Aug 11, 2024
3423617
Remove unwraps for login stdin pipes
gmpinder Aug 11, 2024
83fc2b0
Adjust use of retry function
gmpinder Aug 11, 2024
d362968
Adjust use of retry function
gmpinder Aug 11, 2024
d1cc95c
Merge branch 'main' into signing-driver
gmpinder Aug 11, 2024
1ced72b
Filter out oci_distribution
gmpinder Aug 11, 2024
b1c33e0
Merge branch 'main' into signing-driver
gmpinder Aug 11, 2024
cdd8147
Fix version mismatches and update justfile
gmpinder Aug 11, 2024
46c901c
Add retry for signing and verifying
gmpinder Aug 11, 2024
daa4fa2
Improve cmd macro
gmpinder Aug 11, 2024
27bd0cb
Further improve the cmd macro
gmpinder Aug 12, 2024
ebadb9b
Add feature flag for login command
gmpinder Aug 13, 2024
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
34 changes: 0 additions & 34 deletions .cargo/config_fast_builds.toml

This file was deleted.

46 changes: 41 additions & 5 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,42 @@ env:
RUST_LOG_STYLE: always

jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest

steps:
- uses: earthly/actions-setup@v1

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Run test
id: build
run: |
earthly --ci +test

lint:
timeout-minutes: 20
runs-on: ubuntu-latest

steps:
- uses: earthly/actions-setup@v1

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Run lint
id: build
run: |
earthly --ci +lint

arm64-prebuild:
timeout-minutes: 60
runs-on: ubuntu-latest
Expand Down Expand Up @@ -220,7 +256,7 @@ jobs:
cd integration-tests/test-repo
bluebuild template -vv | tee Containerfile
grep -q 'ARG IMAGE_REGISTRY=ghcr.io/blue-build' Containerfile || exit 1
bluebuild build --push -vv recipes/recipe.yml recipes/recipe-39.yml
bluebuild build -B docker -I docker -S sigstore --push -vv recipes/recipe.yml recipes/recipe-39.yml

docker-build-external-login:
timeout-minutes: 60
Expand Down Expand Up @@ -275,7 +311,7 @@ jobs:
cd integration-tests/test-repo
bluebuild template -vv | tee Containerfile
grep -q 'ARG IMAGE_REGISTRY=ghcr.io/blue-build' Containerfile || exit 1
bluebuild build --push -vv recipes/recipe.yml recipes/recipe-39.yml
bluebuild build -S sigstore --push -vv recipes/recipe.yml recipes/recipe-39.yml

podman-build:
timeout-minutes: 60
Expand Down Expand Up @@ -327,10 +363,10 @@ jobs:
cd integration-tests/test-repo
bluebuild template -vv | tee Containerfile
grep -q 'ARG IMAGE_REGISTRY=ghcr.io/blue-build' Containerfile || exit 1
bluebuild build -B podman --push -vv recipes/recipe.yml recipes/recipe-39.yml
bluebuild build -B podman -I podman -S sigstore --push -vv recipes/recipe.yml recipes/recipe-39.yml

buildah-build:
timeout-minutes: 60
timeout-minutes: 15
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -379,4 +415,4 @@ jobs:
cd integration-tests/test-repo
bluebuild template -vv | tee Containerfile
grep -q 'ARG IMAGE_REGISTRY=ghcr.io/blue-build' Containerfile || exit 1
bluebuild build -B buildah --push -vv recipes/recipe.yml recipes/recipe-39.yml
bluebuild build -B buildah -I podman -S sigstore --squash --push -vv recipes/recipe.yml recipes/recipe-39.yml
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,42 @@ env:
RUST_LOG_STYLE: always

jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest

steps:
- uses: earthly/actions-setup@v1

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Run build
id: build
run: |
earthly --ci +test

lint:
timeout-minutes: 20
runs-on: ubuntu-latest

steps:
- uses: earthly/actions-setup@v1

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Run build
id: build
run: |
earthly --ci +test

arm64-prebuild:
timeout-minutes: 60
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ result*
.direnv/

cosign.key
!test-files/keys/cosign.key

# Local testing for bluebuild recipe files
/config/*
Expand Down
2 changes: 1 addition & 1 deletion .rusty-hook.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[hooks]
pre-commit = "cargo fmt --check && cargo test && cargo test --all-features && cargo clippy -- -D warnings && cargo clippy --all-features -- -D warnings"
pre-push = "cargo fmt --check && cargo test --workspace && cargo test --workspace --all-features && cargo clippy -- -D warnings && cargo clippy --all-features -- -D warnings"

[logging]
verbose = true
Loading