Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
customer-recall
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tools
customer-recall
Commits
729938d1
Commit
729938d1
authored
Aug 15, 2025
by
yiling.shen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
最基础CI/CD配置:只包含基本测试,确保Pipeline能够运行
parent
204f4757
Pipeline
#3169
failed in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
99 deletions
+8
-99
.gitlab-ci.yml
+8
-99
No files found.
.gitlab-ci.yml
View file @
729938d1
# 患者画像回访话术系统 - GitLab CI/CD 配置
#
极简
版本,确保Pipeline成功运行
#
最基础
版本,确保Pipeline成功运行
stages
:
-
test
-
deploy
# 全局变量
variables
:
APP_NAME
:
"
patient-callback-system"
# 强制使用clone策略,确保获取最新代码
GIT_STRATEGY
:
"
clone"
GIT_DEPTH
:
"
0"
# 测试阶段 - 极简版本
# 测试阶段 - 最基础版本
test
:
stage
:
test
image
:
alpine:latest
# 使用更轻量的镜像
variables
:
GIT_STRATEGY
:
"
clone"
script
:
-
echo "=========================================="
-
echo "开始基础测试..."
-
echo "=========================================="
-
echo "CI/CD Job运行分支
:
$CI_COMMIT_REF_NAME"
-
echo "当前工作目录
:
$(pwd)"
-
echo "项目目录
:
$CI_PROJECT_DIR"
-
echo "提交SHA
:
$CI_COMMIT_SHA"
-
echo "=========================================="
-
echo "列出项目目录所有文件(递归):"
-
ls -laR
-
echo "=========================================="
-
echo "检查迁移脚本目录:"
-
ls -la db/migrations/ || echo "迁移目录不存在"
-
echo "=========================================="
-
echo "检查迁移执行脚本:"
-
ls -la run-migrations.sh || echo "迁移脚本不存在"
-
echo "=========================================="
-
echo "系统信息:"
-
uname -a
-
echo "当前用户:"
-
whoami
-
echo "✅ 测试完成"
only
:
-
main
allow_failure
:
false
# 部署到生产环境 - 简化版本
deploy_production
:
stage
:
deploy
image
:
alpine:latest
variables
:
GIT_STRATEGY
:
"
clone"
before_script
:
-
echo "准备部署环境..."
-
apk add --no-cache openssh-client mysql-client curl
script
:
-
echo "=========================================="
-
echo "开始生产环境部署..."
-
echo "=========================================="
-
echo "CI/CD Job运行分支
:
$CI_COMMIT_REF_NAME"
-
echo "当前工作目录
:
$(pwd)"
-
echo "项目目录
:
$CI_PROJECT_DIR"
-
echo "提交SHA
:
$CI_COMMIT_SHA"
-
echo "=========================================="
-
echo "列出项目目录所有文件(递归):"
-
ls -laR
-
echo "=========================================="
-
echo "检查迁移脚本目录:"
-
ls -la db/migrations/ || echo "迁移目录不存在"
-
echo "=========================================="
-
echo "检查迁移执行脚本:"
-
ls -la run-migrations.sh || echo "迁移脚本不存在"
-
echo "=========================================="
-
echo "部署环境检查完成"
-
echo "注意:这是简化版本,实际部署需要配置环境变量"
environment
:
name
:
production
url
:
"
http://localhost:4002"
when
:
manual
only
:
-
main
tags
:
-
production
# 数据库迁移状态检查 - 简化版本
check_migrations
:
stage
:
deploy
image
:
alpine:latest
variables
:
GIT_STRATEGY
:
"
clone"
script
:
-
echo "检查数据库迁移状态..."
-
echo "当前工作目录
:
$(pwd)"
-
echo "项目目录
:
$CI_PROJECT_DIR"
-
echo "列出迁移相关文件:"
-
ls -la db/migrations/ || echo "迁移目录不存在"
-
ls -la run-migrations.sh || echo "迁移脚本不存在"
-
echo "=========================================="
-
echo "迁移状态检查完成(简化版本)"
environment
:
name
:
production
url
:
"
http://localhost:4002"
when
:
manual
-
echo "Pipeline测试开始"
-
echo "当前时间
:
$(date)"
-
echo "工作目录
:
$(pwd)"
-
echo "Pipeline测试完成"
only
:
-
main
tags
:
-
production
allow_failure
:
true
\ No newline at end of file
allow_failure
:
false
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment