| @@ -35,20 +35,6 @@ while getopts "b:s:e:h" opt; do | |||||
| esac | esac | ||||
| done | done | ||||
| valid_services=("manage-front" "manage" "front" "all" "auth" "gateway" "system") | |||||
| if [[ ! " ${valid_services[@]} " =~ " $service " ]]; then | |||||
| echo "Invalid service name: $service" >&2 | |||||
| echo "Valid services are: ${valid_services[*]}" | |||||
| exit 1 | |||||
| fi | |||||
| valid_envs=("dev" "test") | |||||
| if [[ ! " ${valid_envs[@]} " =~ " $env " ]]; then | |||||
| echo "Invalid environment: $env" >&2 | |||||
| echo "Valid environments are: ${valid_envs[*]}" | |||||
| exit 1 | |||||
| fi | |||||
| # 拉取指定分支的最新代码 | # 拉取指定分支的最新代码 | ||||
| echo "Checking out and pulling branch $branch..." | echo "Checking out and pulling branch $branch..." | ||||
| @@ -68,6 +54,20 @@ fi | |||||
| chmod +777 ${baseDir}/k8s/*.sh | chmod +777 ${baseDir}/k8s/*.sh | ||||
| valid_services=("manage-front" "manage" "front" "all" "auth" "gateway" "system") | |||||
| if [[ ! " ${valid_services[@]} " =~ " $service " ]]; then | |||||
| echo "Invalid service name: $service" >&2 | |||||
| echo "Valid services are: ${valid_services[*]}" | |||||
| exit 1 | |||||
| fi | |||||
| valid_envs=("dev" "test") | |||||
| if [[ ! " ${valid_envs[@]} " =~ " $env " ]]; then | |||||
| echo "Invalid environment: $env" >&2 | |||||
| echo "Valid environments are: ${valid_envs[*]}" | |||||
| exit 1 | |||||
| fi | |||||
| echo "start build" | echo "start build" | ||||
| sh ${baseDir}/k8s/build.sh -b ${branch} -s ${service} | sh ${baseDir}/k8s/build.sh -b ${branch} -s ${service} | ||||
| if [ $? -ne 0 ]; then | if [ $? -ne 0 ]; then | ||||