This commit is contained in:
parent
9b70eca9ee
commit
f82a1e9aef
@ -4,13 +4,11 @@ name: microservice-build
|
||||
|
||||
# 定义全局环境变量
|
||||
environment:
|
||||
SERVICE: ""
|
||||
SERVICE: ${DRONE_SERVICE}
|
||||
|
||||
steps:
|
||||
- name: build-service
|
||||
image: maven:3-jdk-8
|
||||
environment:
|
||||
SERVICE: ${DRONE_SERVICE} # 在每个步骤中引用环境变量
|
||||
commands:
|
||||
# - echo "Building Service: ${SERVICE}"
|
||||
- if [ "${SERVICE}" = "gateway-service" ]; then echo "Building Gateway Service..."; fi
|
||||
@ -19,8 +17,6 @@ steps:
|
||||
|
||||
- name: test-service
|
||||
image: maven:3-jdk-8
|
||||
environment:
|
||||
SERVICE: ${DRONE_SERVICE} # 在每个步骤中引用环境变量
|
||||
commands:
|
||||
# - echo "Testing Service: ${SERVICE}"
|
||||
- if [ "${SERVICE}" = "gateway-service" ]; then echo "Testing Gateway Service..."; fi
|
||||
|
Loading…
Reference in New Issue
Block a user