From c72a06e34e66153b1812b2824126b8da9b610d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Wed, 7 Jan 2026 13:16:28 +0100 Subject: [PATCH] feat: add CI/CD script for building Docker images across workspaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ci-build-docker-image.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 ci-build-docker-image.sh diff --git a/ci-build-docker-image.sh b/ci-build-docker-image.sh new file mode 100755 index 0000000..1a62840 --- /dev/null +++ b/ci-build-docker-image.sh @@ -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"