测试环境传固定镜像地址

This commit is contained in:
dongmei
2026-06-16 17:26:22 +08:00
parent c3de4b5b45
commit fb0fba9a0c

View File

@@ -84,7 +84,7 @@ jobs:
git checkout "${{ github.event.inputs.ref }}"
# 打 tag
TAG_NAME="build-${{ github.event.inputs.submission_id }}-${{ github.event.inputs.job_id }}"
TAG_NAME="build-submission${{ github.event.inputs.submission_id }}-job${{ github.event.inputs.job_id }}"
git tag "$TAG_NAME"
echo "已打 tag: $TAG_NAME"
@@ -220,11 +220,18 @@ jobs:
ERR_MESSAGE=$(tail -n 20 push.log 2>/dev/null || echo "Docker 镜像推送失败")
fi
# 回调地址为指定地址时,使用固定镜像地址
if [ "$CALLBACK_URL" == "172.27.231.23/api/jobs/build/callback" ]; then
IMAGE_URL="harbor-contest.4pd.io/luopingyi/enginex-iluvatar-bi150/vllm:0.8.3"
else
IMAGE_URL="$IMAGE"
fi
# 使用 jq 构造 JSON 请求体
if [ -n "$ERR_MESSAGE" ]; then
BODY=$(jq -n \
--arg jobId "$JOB_ID" \
--arg imageUrl "$IMAGE" \
--arg imageUrl "$IMAGE_URL" \
--arg status "$STATUS" \
--arg errMessage "$ERR_MESSAGE" \
--argjson startupParams "$STARTUP_PARAMS" \
@@ -232,7 +239,7 @@ jobs:
else
BODY=$(jq -n \
--arg jobId "$JOB_ID" \
--arg imageUrl "$IMAGE" \
--arg imageUrl "$IMAGE_URL" \
--arg status "$STATUS" \
--argjson startupParams "$STARTUP_PARAMS" \
'{jobId: $jobId, imageUrl: $imageUrl, status: $status, startupParams: $startupParams}')