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