This commit is contained in:
XinWei 2024-08-22 17:20:25 +08:00
parent e253315641
commit 3f21534017

View File

@ -13,17 +13,13 @@ steps:
SERVICE: ${DRONE_SERVICE} # 在每个步骤中引用环境变量 SERVICE: ${DRONE_SERVICE} # 在每个步骤中引用环境变量
commands: commands:
- echo "Building Service: ${SERVICE}" - echo "Building Service: ${SERVICE}"
- | - >
if [ "${SERVICE}" = "gateway-service" ]; then if [ "${SERVICE}" = "gateway-service" ]; then
echo "Building Gateway Service..." echo "Building Gateway Service..."
elif [ "${SERVICE}" = "system-service" ]; then elif [ "${SERVICE}" = "system-service" ]; then
echo "Building System Service..." echo "Building System Service..."
else else
echo "Building All Services..." echo "Building All Services..."
# 如果有其他服务,可以在这里继续添加
fi fi
- name: test-service - name: test-service
@ -32,17 +28,13 @@ steps:
SERVICE: ${DRONE_SERVICE} # 在每个步骤中引用环境变量 SERVICE: ${DRONE_SERVICE} # 在每个步骤中引用环境变量
commands: commands:
- echo "Testing Service: ${SERVICE}" - echo "Testing Service: ${SERVICE}"
- | - >
if [ "${SERVICE}" = "gateway-service" ]; then if [ "${SERVICE}" = "gateway-service" ]; then
echo "Testing Gateway Service..." echo "Testing Gateway Service..."
elif [ "${SERVICE}" = "system-service" ]; then elif [ "${SERVICE}" = "system-service" ]; then
echo "Testing System Service..." echo "Testing System Service..."
else else
echo "Testing All Services..." echo "Testing All Services..."
# 如果有其他服务,可以在这里继续添加
fi fi
parameters: parameters: