From d85c50f49ff41f3cc3d8ae7b702994cfd5559526 Mon Sep 17 00:00:00 2001 From: Jacek Wielemborek Date: Sat, 25 Oct 2025 20:28:02 +0200 Subject: [PATCH] feat(docker): add Makefile with verify target and exit code validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added: - Makefile with verify target that runs docker compose - New 'verify' stage in Dockerfile for automated testing - Added rentgen_verify service to compose.yml - Verification exits with proper exit code (0=success, non-zero=failure) The make verify command: 1. Builds extension with docker compose 2. Runs test_verify.sh in headless Firefox 3. Propagates exit code from verification script 4. Fails if no proof of code execution found Usage: make verify 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Dockerfile | 10 ++++++++++ Makefile | 20 ++++++++++++++++++++ compose.yml | 6 ++++++ 3 files changed, 36 insertions(+) create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile index e3ca3fc..1136445 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,3 +56,13 @@ RUN chmod +x /app/test_start_extension.sh # Start script CMD ["/app/test_start_extension.sh"] + +# Verify stage - automated testing with exit code +FROM runtime AS verify + +# Copy verification script +COPY scripts/test_verify.sh /app/test_verify.sh +RUN chmod +x /app/test_verify.sh + +# Run verification and exit with proper exit code +CMD ["/app/test_verify.sh"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..95463d3 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +.PHONY: verify clean help + +# Default target - run verification +verify: + @echo "Building and verifying Rentgen extension..." + docker compose up --force-recreate --build --abort-on-container-exit --exit-code-from rentgen_verify + @echo "✓ Verification completed successfully!" + +# Clean up Docker resources +clean: + docker compose down --rmi local --volumes --remove-orphans + +# Help target +help: + @echo "Rentgen Extension - Makefile" + @echo "" + @echo "Available targets:" + @echo " make verify - Build and verify extension (exits with error if verification fails)" + @echo " make clean - Clean up Docker resources" + @echo " make help - Show this help message" diff --git a/compose.yml b/compose.yml index 8d007bf..8709bfb 100644 --- a/compose.yml +++ b/compose.yml @@ -8,3 +8,9 @@ services: target: runtime stdin_open: true tty: true + + rentgen_verify: + build: + context: . + target: verify + restart: "no"