修复 Drone CI 配置:移除 host volumes 以解决 untrusted 仓库问题
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
- 移除 maven-cache volume 挂载 - 同一构建内的步骤仍可共享 Maven 本地仓库 - BladeX 框架编译结果可被后端编译步骤复用 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
12
.drone.yml
12
.drone.yml
@@ -13,9 +13,6 @@ steps:
|
|||||||
# 步骤1:编译 BladeX 框架
|
# 步骤1:编译 BladeX 框架
|
||||||
- name: 编译框架依赖
|
- name: 编译框架依赖
|
||||||
image: maven:3.9-eclipse-temurin-17
|
image: maven:3.9-eclipse-temurin-17
|
||||||
volumes:
|
|
||||||
- name: maven-cache
|
|
||||||
path: /root/.m2
|
|
||||||
commands:
|
commands:
|
||||||
- echo "开始编译 BladeX 框架..."
|
- echo "开始编译 BladeX 框架..."
|
||||||
- cd /drone/src/../martial-tool
|
- cd /drone/src/../martial-tool
|
||||||
@@ -25,9 +22,6 @@ steps:
|
|||||||
# 步骤2:编译后端项目
|
# 步骤2:编译后端项目
|
||||||
- name: 编译后端项目
|
- name: 编译后端项目
|
||||||
image: maven:3.9-eclipse-temurin-17
|
image: maven:3.9-eclipse-temurin-17
|
||||||
volumes:
|
|
||||||
- name: maven-cache
|
|
||||||
path: /root/.m2
|
|
||||||
commands:
|
commands:
|
||||||
- echo "开始编译后端项目..."
|
- echo "开始编译后端项目..."
|
||||||
- mvn clean package -DskipTests -Dmaven.test.skip=true
|
- mvn clean package -DskipTests -Dmaven.test.skip=true
|
||||||
@@ -73,12 +67,6 @@ steps:
|
|||||||
- curl -f http://154.30.6.21:8123/actuator/health || exit 1
|
- curl -f http://154.30.6.21:8123/actuator/health || exit 1
|
||||||
- echo "✅ 健康检查通过"
|
- echo "✅ 健康检查通过"
|
||||||
|
|
||||||
# 挂载卷(缓存 Maven 依赖,加速构建)
|
|
||||||
volumes:
|
|
||||||
- name: maven-cache
|
|
||||||
host:
|
|
||||||
path: /data/drone-cache/maven
|
|
||||||
|
|
||||||
# 构建通知(可选)
|
# 构建通知(可选)
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
|||||||
Reference in New Issue
Block a user