feat: add CI/CD script for building Docker images across workspaces

Add ci-build-docker-image.sh script to automate Docker image builds in CI/CD pipelines. Script iterates through configured workspaces and builds images using --auto-version and --auto-push flags. Currently configured for mailgun-webhook, easily extensible for additional workspaces.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-07 13:16:28 +01:00
parent 9d6507c3ae
commit c72a06e34e

36
ci-build-docker-image.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# CI/CD script to build and push Docker images for workspace projects
# Uses version from package.json and automatically pushes to registry
set -e # Exit on error
# List of workspaces to build
WORKSPACES=(
"mailgun-webhook"
)
printf "\n=== CI/CD Docker Image Build ===\n"
printf "Building %d workspace(s)\n\n" "${#WORKSPACES[@]}"
for WORKSPACE_DIR in "${WORKSPACES[@]}"; do
printf "\n--- Building workspace: %s ---\n\n" "$WORKSPACE_DIR"
if [ ! -d "$WORKSPACE_DIR" ]; then
printf "\nERROR: Directory '%s' does not exist. Skipping.\n\n" "$WORKSPACE_DIR"
continue
fi
if [ ! -f "$WORKSPACE_DIR/build-image.sh" ]; then
printf "\nERROR: build-image.sh not found in '%s'. Skipping.\n\n" "$WORKSPACE_DIR"
continue
fi
cd "$WORKSPACE_DIR"
./build-image.sh --auto-version --auto-push
cd ..
printf "\n--- Completed: %s ---\n" "$WORKSPACE_DIR"
done
printf "\n=== All builds completed successfully! ===\n\n"