From 6ef8e3284a69924d0e5db67576eb5aa059866bb0 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 2 Apr 2025 01:50:31 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ebc7d73..b7c73c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,15 +10,26 @@ stages: # 发布 job_deploy: only: - - master + - 00.StaryEvo stage: deploy - image: node:latest # 直接在此处定义 tags: - staryEvo before_script: - echo '开始发布' + - echo '开始发布' + - docker info # 添加 Docker 环境验证 + - node -v # 验证 Node.js 版本 script: - - cd Assets/02.InformationSave + # 添加镜像拉取重试逻辑 + - retry_count=0 + - until [ "$retry_count" -ge 3 ]; do + docker pull node:latest && break; + retry_count=$((retry_count+1)); + echo "镜像拉取失败,重试 $retry_count/3"; + sleep 5; + done + + - cd Assets/00.StaryEvo # 获取当前版本 - CURRENT_VERSION=$(node -p "require('./package.json').version") # - echo " ProjectID ${CI_SERVER_HOST}"