test/.drone.yml
XinWei f82a1e9aef
All checks were successful
continuous-integration/drone Build is passing
'build'
2024-08-22 17:28:20 +08:00

30 lines
994 B
YAML

kind: pipeline
type: docker
name: microservice-build
# 定义全局环境变量
environment:
SERVICE: ${DRONE_SERVICE}
steps:
- name: build-service
image: maven:3-jdk-8
commands:
# - echo "Building Service: ${SERVICE}"
- if [ "${SERVICE}" = "gateway-service" ]; then echo "Building Gateway Service..."; fi
- if [ "${SERVICE}" = "system-service" ]; then echo "Building System Service..."; fi
- if [ "${SERVICE}" = "" ]; then echo "Building All Services..."; fi
- name: test-service
image: maven:3-jdk-8
commands:
# - echo "Testing Service: ${SERVICE}"
- if [ "${SERVICE}" = "gateway-service" ]; then echo "Testing Gateway Service..."; fi
- if [ "${SERVICE}" = "system-service" ]; then echo "Testing System Service..."; fi
- if [ "${SERVICE}" = "" ]; then echo "Testing All Services..."; fi
parameters:
SERVICE:
description: "The service to build and test. Leave empty to build and test all services."
default: ""