Add GitOps stack for abrban.com with Gitea Actions CI/CD.
Build and Deploy Platform / build-push-deploy (push) Has been cancelled
Build and Deploy Platform / build-push-deploy (push) Has been cancelled
Harbor in-cluster builds via Kaniko, ArgoCD auto-sync, and production Helm values for abrban.com domains. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
# Deploy platform via Helm only — images must already be in Harbor (built by Gitea Actions / Kaniko).
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
NAMESPACE="${NAMESPACE:-cloudhost}"
|
||||
RELEASE="${RELEASE:-cloudhost}"
|
||||
VALUES="${VALUES:-${ROOT}/gitops/platform/values-abrban.yaml}"
|
||||
TAG="${TAG:-}"
|
||||
|
||||
if [[ -z "${TAG}" ]]; then
|
||||
TAG="$(grep -E '^\s+tag:' "${VALUES}" | head -1 | sed 's/.*tag: *"\?\([^"]*\)"\?.*/\1/')"
|
||||
fi
|
||||
|
||||
if [[ -z "${TAG}" || "${TAG}" == "1.0.0" ]]; then
|
||||
echo "ERROR: No image tag set. Build in-cluster first:" >&2
|
||||
echo " ./scripts/trigger-platform-build.sh" >&2
|
||||
echo "Or set TAG=... after CI has pushed images." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "==> Helm upgrade ${RELEASE} (tag=${TAG})"
|
||||
helm upgrade --install "${RELEASE}" "${ROOT}/backend/helm/cloudhost-platform" \
|
||||
-n "${NAMESPACE}" \
|
||||
-f "${VALUES}" \
|
||||
--set createNamespace=false \
|
||||
--set global.storageClass=local-path \
|
||||
--set images.backend.tag="${TAG}" \
|
||||
--set images.frontend.tag="${TAG}" \
|
||||
--timeout 15m \
|
||||
--wait
|
||||
|
||||
kubectl -n "${NAMESPACE}" rollout status deploy/cloudhost-backend --timeout=300s
|
||||
kubectl -n "${NAMESPACE}" rollout status deploy/cloudhost-frontend --timeout=300s
|
||||
|
||||
echo "==> Done (tag=${TAG})"
|
||||
Reference in New Issue
Block a user