Files
EventHubFrontAdmin/scripts/clone-devops-run.sh
T
aleksey d0e5933b38
CI / test (push) Successful in 3m0s
fix(deploy-stage): workflow_dispatch и clone DevOps с master
Аналогично Back: ручной deploy v0.1.1 с sha-3f5dde498652 без пересборки.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 16:03:31 +03:00

25 lines
668 B
Bash

#!/usr/bin/env bash
# CI: clone EventHubDevOps и вызвать скрипт.
set -euo pipefail
SCRIPT_REL="${1:?script path under devops/}"
shift
DEVOPS_REPO="${DEVOPS_REPO:-https://git.sabilin.com/EventHub/EventHubDevOps.git}"
DEVOPS_REF="${DEVOPS_REF:-master}"
if [[ -z "${REGISTRY_USER:-}" || -z "${REGISTRY_PASSWORD:-}" ]]; then
echo "REGISTRY_USER/PASSWORD required"
exit 1
fi
WORKDIR="$(mktemp -d)"
trap 'rm -rf "${WORKDIR}"' EXIT
repo_path="${DEVOPS_REPO#https://}"
git clone --depth 1 --branch "${DEVOPS_REF}" \
"https://${REGISTRY_USER}:${REGISTRY_PASSWORD}@${repo_path}" \
"${WORKDIR}/devops"
exec bash "${WORKDIR}/devops/${SCRIPT_REL}" "$@"