CI/CD Gitea v1.0
Some checks failed
Deploy to Staging / Build Images (push) Failing after 7s
Deploy to Staging / Deploy to Staging (push) Has been skipped
Deploy to Staging / Verify Staging (push) Has been skipped
Deploy to Staging / Notify Staging Ready (push) Has been skipped
Deploy to Staging / Notify Staging Failure (push) Failing after 6s

This commit is contained in:
Eric Gullickson
2025-12-29 18:51:41 -06:00
parent 9b0de6a5b8
commit 83d79da3aa
15 changed files with 1101 additions and 929 deletions

View File

@@ -5,7 +5,7 @@
set -euo pipefail
REGISTRY="${REGISTRY:-registry.motovaultpro.com/mirrors}"
REGISTRY="${REGISTRY:-git.motovaultpro.com/egullickson/mirrors}"
# Base images required by MotoVaultPro
IMAGES=(

View File

@@ -3,7 +3,7 @@
# Sends email notifications for deployment events
#
# Usage: ./notify.sh <event_type> [message] [commit_sha]
# event_type: success, failure, rollback, rollback_failed, maintenance_start, maintenance_end
# event_type: success, failure, rollback, rollback_failed, maintenance_start, maintenance_end, staging_ready
# message: Optional custom message
# commit_sha: Optional commit SHA for context
#
@@ -39,15 +39,16 @@ if [[ -z "$NOTIFY_EMAIL" ]]; then
exit 0
fi
# Get Resend API key
RESEND_API_KEY=""
if [[ -f "/run/secrets/resend-api-key" ]]; then
RESEND_API_KEY=$(cat /run/secrets/resend-api-key)
elif [[ -f "$PROJECT_ROOT/secrets/app/resend-api-key.txt" ]]; then
RESEND_API_KEY=$(cat "$PROJECT_ROOT/secrets/app/resend-api-key.txt")
# Get Resend API key (check env first for Gitea, then files for containers)
if [[ -z "${RESEND_API_KEY:-}" ]]; then
if [[ -f "/run/secrets/resend-api-key" ]]; then
RESEND_API_KEY=$(cat /run/secrets/resend-api-key)
elif [[ -f "$PROJECT_ROOT/secrets/app/resend-api-key.txt" ]]; then
RESEND_API_KEY=$(cat "$PROJECT_ROOT/secrets/app/resend-api-key.txt")
fi
fi
if [[ -z "$RESEND_API_KEY" ]]; then
if [[ -z "${RESEND_API_KEY:-}" ]]; then
echo "WARNING: Resend API key not found, skipping notification"
exit 0
fi
@@ -96,6 +97,13 @@ case "$EVENT_TYPE" in
STATUS_TEXT="Maintenance Complete"
DEFAULT_MESSAGE="Maintenance window complete. Application is online."
;;
"staging_ready")
SUBJECT="Staging Ready for Production - MotoVaultPro"
STATUS_COLOR="#3b82f6"
STATUS_EMOJI="[STAGING]"
STATUS_TEXT="Staging Verified"
DEFAULT_MESSAGE="Staging deployment verified. Ready for production deployment."
;;
*)
echo "Unknown event type: $EVENT_TYPE"
exit 1