This commit is contained in:
XinWei 2024-08-22 17:18:18 +08:00
parent 3177130523
commit e253315641

View File

@ -4,11 +4,13 @@ name: microservice-build
# 定义全局环境变量
environment:
SERVICE: ${DRONE_SERVICE}
SERVICE: ""
steps:
- name: build-service
image: maven:3-jdk-8
environment:
SERVICE: ${DRONE_SERVICE} # 在每个步骤中引用环境变量
commands:
- echo "Building Service: ${SERVICE}"
- |
@ -26,6 +28,8 @@ steps:
- name: test-service
image: maven:3-jdk-8
environment:
SERVICE: ${DRONE_SERVICE} # 在每个步骤中引用环境变量
commands:
- echo "Testing Service: ${SERVICE}"
- |