renamed script file
This commit is contained in:
36
ci-build.sh
Executable file
36
ci-build.sh
Executable 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"
|
||||
Reference in New Issue
Block a user