test/.drone.yml

39 lines
1007 B
YAML
Raw Normal View History

2024-08-22 17:14:13 +08:00
kind: pipeline
type: docker
name: microservice-build
2024-08-08 09:43:22 +08:00
2024-09-10 11:11:52 +08:00
clone:
disable: true
2024-08-22 17:14:13 +08:00
steps:
2024-08-22 17:35:18 +08:00
- name: debug-env
image: alpine:latest
commands:
- env
2024-08-22 17:14:13 +08:00
- name: build-service
image: maven:3-jdk-8
commands:
2024-08-22 17:24:58 +08:00
# - echo "Building Service: ${SERVICE}"
2024-08-22 17:31:24 +08:00
- |
2024-09-10 11:11:52 +08:00
if [ ${SERVICE} = "gateway" ]; then
2024-08-22 17:31:24 +08:00
echo "Building Gateway Service..."
2024-09-10 11:11:52 +08:00
elif [ ${SERVICE} = "system" ]; then
2024-08-22 17:31:24 +08:00
echo "Building System Service..."
else
echo "Building All Services..."
# 如果有其他服务,可以在这里继续添加
fi
2024-08-08 09:43:22 +08:00
2024-08-22 17:14:13 +08:00
- name: test-service
image: maven:3-jdk-8
2024-08-08 09:43:22 +08:00
commands:
2024-08-22 17:24:58 +08:00
# - echo "Testing Service: ${SERVICE}"
2024-08-22 17:31:24 +08:00
- |
2024-09-10 11:11:52 +08:00
if [ "${SERVICE}" = "gateway" ]; then
2024-08-22 17:31:24 +08:00
echo "Testing Gateway Service..."
2024-09-10 11:11:52 +08:00
elif [ "${SERVICE}" = "system" ]; then
2024-08-22 17:31:24 +08:00
echo "Testing System Service..."
else
echo "Testing All Services..."
# 如果有其他服务,可以在这里继续添加
fi