Browse Source

优化部署文件

dev-lc
chenzhihang 1 year ago
parent
commit
19681ccca1
1 changed files with 14 additions and 14 deletions
  1. +14
    -14
      k8s/build_and_deploy.sh

+ 14
- 14
k8s/build_and_deploy.sh View File

@@ -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


Loading…
Cancel
Save