You need to sign in or sign up before continuing.
Commit fcc22f24 authored by svc-mlops's avatar svc-mlops

sim: đồng bộ code serving, bump v1.0.4

parent f45eb23d
Pipeline #8 passed with stages
in 28 seconds
...@@ -7,8 +7,10 @@ ENV_NAME=$1 ...@@ -7,8 +7,10 @@ ENV_NAME=$1
VERSION=$2 VERSION=$2
USER_NAME=$(bash scripts/kretry.sh kubectl get secret git-push-creds -n ci -o jsonpath='{.data.username}' | base64 -d) USER_NAME=$(bash scripts/kretry.sh kubectl get secret git-push-creds -n ci -o jsonpath='{.data.username}' | base64 -d)
TOKEN=$(bash scripts/kretry.sh kubectl get secret git-push-creds -n ci -o jsonpath='{.data.token}' | base64 -d) TOKEN=$(bash scripts/kretry.sh kubectl get secret git-push-creds -n ci -o jsonpath='{.data.token}' | base64 -d)
HOST=$(echo "$CI_PROJECT_URL" | sed -E 's#^https?://##') # GIT_PUSH_BASE (runner đặt) cho phép push qua địa chỉ nội bộ khi external_url của GitLab là tên miền khác
URL="http://${USER_NAME}:${TOKEN}@${HOST}.git" BASE=${GIT_PUSH_BASE:-$(echo "$CI_PROJECT_URL" | sed -E "s#/${CI_PROJECT_PATH}\$##")}
HOST=$(echo "$BASE" | sed -E 's#^https?://##')
URL="http://${USER_NAME}:${TOKEN}@${HOST}/${CI_PROJECT_PATH}.git"
WORK=$(mktemp -d) WORK=$(mktemp -d)
git clone -q --depth 1 --branch master "$URL" "$WORK" git clone -q --depth 1 --branch master "$URL" "$WORK"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment