simplify: share workspace between steps
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Agent
2026-03-22 05:33:16 +00:00
parent b7268f4447
commit b19f09af24

View File

@@ -6,8 +6,6 @@ name: build-and-deploy-dev
volumes:
- name: maven-cache
emptyDir: {}
- name: source-code
emptyDir: {}
trigger:
event:
@@ -19,13 +17,10 @@ steps:
- name: dev-build
image: ccr.ccs.tencentyun.com/violin/maven:3.9-eclipse-temurin-22
commands:
- cp -r . /source
- mvn clean package -DskipTests
volumes:
- name: maven-cache
mountPath: /root/.m2
- name: source-code
mountPath: /source
- name: dev-build-image
image: ccr.ccs.tencentyun.com/violin/kaniko-project-executor:latest
@@ -35,12 +30,9 @@ steps:
commands:
- >-
/kaniko/executor
--context /source
--context .
--destination ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
--destination ccr.ccs.tencentyun.com/violin/todo-backend:latest
volumes:
- name: source-code
mountPath: /source
- name: dev-deploy
image: ccr.ccs.tencentyun.com/violin/kubectl:latest
@@ -60,8 +52,6 @@ name: build-and-deploy-prod
volumes:
- name: maven-cache
emptyDir: {}
- name: source-code
emptyDir: {}
trigger:
event:
@@ -73,13 +63,10 @@ steps:
- name: prod-build
image: ccr.ccs.tencentyun.com/violin/maven:3.9-eclipse-temurin-22
commands:
- cp -r . /source
- mvn clean package -DskipTests
volumes:
- name: maven-cache
mountPath: /root/.m2
- name: source-code
mountPath: /source
- name: prod-build-image
image: ccr.ccs.tencentyun.com/violin/kaniko-project-executor:latest
@@ -89,12 +76,9 @@ steps:
commands:
- >-
/kaniko/executor
--context /source
--context .
--destination ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
--destination ccr.ccs.tencentyun.com/violin/todo-backend:v1.0.0
volumes:
- name: source-code
mountPath: /source
- name: prod-deploy
image: ccr.ccs.tencentyun.com/violin/kubectl:latest