Files
aleksey 9cc4d6b85d
CI / test (push) Failing after 4m14s
Co-authored-by:
2026-07-11 15:41:34 +03:00

27 lines
770 B
Bash

#!/usr/bin/env bash
# CI: clone EventHubDevOps и promote-images.sh (admin-ui)
set -euo pipefail
SHA_TAG="${1:?sha-tag}"
RELEASE_TAG="${2:?release-tag}"
STAND_ALIAS="${3:-stage}"
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"
bash "${WORKDIR}/devops/scripts/promote-images.sh" \
"${SHA_TAG}" "${RELEASE_TAG}" "${STAND_ALIAS}" eventhub-admin-ui