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

feat(experimental): Build multiple recipes in parallel #182

Merged
merged 42 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
efc7ec3
Start work on supporting buildx bake
gmpinder May 12, 2024
57632cb
Get code compiling
gmpinder May 12, 2024
d70f2e9
feat: Build multiple recipes in paralell
gmpinder May 13, 2024
a78a975
Fix race condition for bluebuild buildx builder
gmpinder May 13, 2024
ef399d6
Make docker driver use full image
gmpinder May 13, 2024
cf1e7c8
Create hash for Containerfile builds
gmpinder May 13, 2024
2d150e6
Create trait for log level
gmpinder May 13, 2024
9db74b7
Use HSL to generate a random color
gmpinder May 13, 2024
000df97
Add variation to saturation and lightness
gmpinder May 13, 2024
115fe27
Label args for log writing
gmpinder May 13, 2024
2432c13
Merge branch 'main' into multi-recipe-build
gmpinder May 14, 2024
3bef9e5
Merge branch 'main' into multi-recipe-build
gmpinder May 14, 2024
e9929f7
Switch to using ANSI 256 colors
gmpinder May 14, 2024
8b10c90
Make logs more consistent
gmpinder May 14, 2024
059f007
Don't call log_header on each call
gmpinder May 15, 2024
d5cf5aa
Merge branch 'main' into multi-recipe-build
gmpinder May 15, 2024
b075088
Properly support color management
gmpinder May 15, 2024
d6b55b3
Merge branch 'main' into multi-recipe-build
gmpinder May 15, 2024
403043d
Explicitly define ANSI colors
gmpinder May 15, 2024
797152a
Merge branch 'main' into multi-recipe-build
gmpinder May 18, 2024
a2a073b
Merge branch 'main' into multi-recipe-build
gmpinder May 18, 2024
29ea903
Create a feature gate for multi-recipe builds
gmpinder May 18, 2024
bcbea34
Update helix config
gmpinder May 18, 2024
fbb9b01
Merge branch 'main' into multi-recipe-build
gmpinder May 18, 2024
8bd9865
Merge branch 'main' into multi-recipe-build
gmpinder May 18, 2024
c8e2001
Fix race condition
gmpinder May 18, 2024
11173f5
Merge branch 'main' into multi-recipe-build
gmpinder May 27, 2024
1be4d89
Start the migration to using tracing instead of log and env_logger
gmpinder May 27, 2024
9d5b7cc
Revert "Start the migration to using tracing instead of log and env_l…
gmpinder May 27, 2024
f82a581
Add indicatif crates
gmpinder May 27, 2024
2ff7fe0
Start work on adding indicatif
gmpinder May 27, 2024
9bff149
Update git hooks
gmpinder May 27, 2024
137db87
Combine stderr and stdio in preperation to use indicatif
gmpinder May 28, 2024
2313a88
Finish setting up logging for build commands
gmpinder May 28, 2024
ef0bea4
Add progress spinners for various other tasks
gmpinder May 28, 2024
7cdf11f
Go back to using status_image_ref_progress
gmpinder May 28, 2024
76dd820
Fix mocks
gmpinder May 28, 2024
2f8507e
Merge branch 'main' into multi-recipe-build
gmpinder Jun 2, 2024
620b63f
Replace env_logger with log4rs
gmpinder Jun 2, 2024
5dd0163
Merge branch 'main' into multi-recipe-build
gmpinder Jun 3, 2024
e48bf5a
Merge branch 'main' into multi-recipe-build
gmpinder Jun 7, 2024
28d87ed
Get command logging to file working
gmpinder Jun 7, 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
18 changes: 10 additions & 8 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:

env:
FORCE_COLOR: 1
CLICOLOR_FORCE: 1
RUST_LOG_STYLE: always

jobs:
arm64-prebuild:
Expand Down Expand Up @@ -203,7 +205,7 @@ jobs:

- name: Install bluebuild
run: |
cargo install --path . --debug
cargo install --path . --debug --all-features

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
Expand All @@ -218,7 +220,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
bluebuild build --push -vv recipes/recipe.yml recipes/recipe-39.yml

docker-build-external-login:
timeout-minutes: 60
Expand Down Expand Up @@ -259,7 +261,7 @@ jobs:

- name: Install bluebuild
run: |
cargo install --path . --debug
cargo install --path . --debug --all-features

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
Expand All @@ -273,7 +275,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
bluebuild build --push -vv recipes/recipe.yml recipes/recipe-39.yml

podman-build:
timeout-minutes: 60
Expand Down Expand Up @@ -314,7 +316,7 @@ jobs:

- name: Install bluebuild
run: |
cargo install --path . --debug
cargo install --path . --debug --all-features

- name: Run Build
env:
Expand All @@ -325,7 +327,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 -B podman --push -vv
bluebuild build -B podman --push -vv recipes/recipe.yml recipes/recipe-39.yml

buildah-build:
timeout-minutes: 60
Expand Down Expand Up @@ -366,7 +368,7 @@ jobs:

- name: Install bluebuild
run: |
cargo install --path . --debug
cargo install --path . --debug --all-features

- name: Run Build
env:
Expand All @@ -377,4 +379,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
bluebuild build -B buildah --push -vv recipes/recipe.yml recipes/recipe-39.yml
18 changes: 10 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:

env:
FORCE_COLOR: 1
CLICOLOR_FORCE: 1
RUST_LOG_STYLE: always

jobs:
arm64-prebuild:
Expand Down Expand Up @@ -201,7 +203,7 @@ jobs:

- name: Install bluebuild
run: |
cargo install --path . --debug
cargo install --path . --debug --all-features

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
Expand All @@ -216,7 +218,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
bluebuild build --push -vv recipes/recipe.yml recipes/recipe-39.yml

docker-build-external-login:
timeout-minutes: 60
Expand Down Expand Up @@ -257,7 +259,7 @@ jobs:

- name: Install bluebuild
run: |
cargo install --path . --debug
cargo install --path . --debug --all-features

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
Expand All @@ -271,7 +273,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
bluebuild build --push -vv recipes/recipe.yml recipes/recipe-39.yml

podman-build:
timeout-minutes: 60
Expand Down Expand Up @@ -312,7 +314,7 @@ jobs:

- name: Install bluebuild
run: |
cargo install --path . --debug
cargo install --path . --debug --all-features

- name: Run Build
env:
Expand All @@ -323,7 +325,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 -B podman --push -vv
bluebuild build -B podman --push -vv recipes/recipe.yml recipes/recipe-39.yml

buildah-build:
timeout-minutes: 60
Expand Down Expand Up @@ -364,7 +366,7 @@ jobs:

- name: Install bluebuild
run: |
cargo install --path . --debug
cargo install --path . --debug --all-features

- name: Run Build
env:
Expand All @@ -375,4 +377,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
bluebuild build -B buildah --push -vv recipes/recipe.yml recipes/recipe-39.yml
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 --all-features && cargo clippy --all-features -- -D warnings"
pre-commit = "cargo fmt --check && cargo test && cargo test --all-features && cargo clippy -- -D warnings && cargo clippy --all-features -- -D warnings"

[logging]
verbose = true
Loading