-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.sh
43 lines (32 loc) · 1.01 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
echo -e "\033[31m1.是否更新代码 \033[0m"
select isPullCode in "YES" "NO"; do
break;
done
if [ $isPullCode = "YES" ]; then
echo -e "\033[34m Is Pull Code: $isPullCode \033[0m"
git pull
else
echo -e "\033[34m Is Pull Code: $isPullCode \033[0m"
push=""
fi
echo -e "\033[31m2.请选择需要编译并推送镜像的项目 \033[0m"
select app in "blogyg-server-eureka" "blogyg-server-client" "blogyg-server-gateway" "blogyg-server-feign" \
"blogyg-server-ribbon" "blogyg-server-zuul" "blogyg-server-zipkin" "blogyg-server-monitor" "auth-security-server" "auth-security-client" \
; do
break;
done
echo -e "\033[34m 确定编译并推送: $app ?\033[0m"
select confirm in "YES" "NO"; do
break;
done
if [ $confirm = "YES" ]; then
# 切换目录
cd $app
#执行打包
mvn clean package docker:build
docker push harbor.blogyg.cn/blogyg/$app:v1.0.0
echo -e "push docker images : harbor.blogyg.cn/blogyg/$app:v1.0.0"
else
echo -e "取消编译并推送"
fi