From 532198dd5ac6560a2d510f3a368725253d6cec13 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Sun, 8 Jun 2025 00:37:17 -0400 Subject: [PATCH 1/2] chore: Add alpine-base example for multi-platform testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add example/alpine-base project that uses Alpine Linux as base image - Update CI extended-platforms job to use the example directory - Simplifies CI configuration by moving test project to examples 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 19 +------------------ example/alpine-base/Cargo.toml | 7 +++++++ example/alpine-base/src/main.rs | 3 +++ 3 files changed, 11 insertions(+), 18 deletions(-) create mode 100644 example/alpine-base/Cargo.toml create mode 100644 example/alpine-base/src/main.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4ee80a..971ac1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -200,25 +200,8 @@ jobs: run: cargo build --release - name: Test multi-platform build with Alpine base run: | - # Create a test project that uses Alpine (which supports many platforms) - mkdir -p test-alpine-platforms/src - cat > test-alpine-platforms/Cargo.toml << 'EOF' - [package] - name = "test-alpine" - version = "0.1.0" - edition = "2021" - - [package.metadata.krust] - base-image = "alpine:latest" - EOF - cat > test-alpine-platforms/src/main.rs << 'EOF' - fn main() { - println!("Hello from Alpine multi-platform test!"); - } - EOF - # Test that platform detection works (even if we can't build all platforms) - cd test-alpine-platforms + cd alpine-base ../target/release/krust build --no-push --image test.local/alpine-test:latest . 2>&1 | tee build.log # Verify platform detection happened diff --git a/example/alpine-base/Cargo.toml b/example/alpine-base/Cargo.toml new file mode 100644 index 0000000..8646711 --- /dev/null +++ b/example/alpine-base/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "test-alpine" +version = "0.1.0" +edition = "2021" + +[package.metadata.krust] +base-image = "alpine:latest" diff --git a/example/alpine-base/src/main.rs b/example/alpine-base/src/main.rs new file mode 100644 index 0000000..4a48287 --- /dev/null +++ b/example/alpine-base/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello from Alpine multi-platform test!"); +} From d3e2b881bb35c76031a9188fa8f85c2aa4588a83 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Sun, 8 Jun 2025 00:43:30 -0400 Subject: [PATCH 2/2] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 971ac1e..ca77086 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -201,7 +201,7 @@ jobs: - name: Test multi-platform build with Alpine base run: | # Test that platform detection works (even if we can't build all platforms) - cd alpine-base + cd example/alpine-base ../target/release/krust build --no-push --image test.local/alpine-test:latest . 2>&1 | tee build.log # Verify platform detection happened