Commit 9f7bf5f8 by wangtingwei

分支抽离为变量

1 parent 4fedd84c
Showing with 11 additions and 4 deletions
#!/bin/bash
###################################变量相关######################################
now=$(date +%Y%m%d%H%M%S)
workspace=/home/wangtingwei/ksyun_image_update
###################################################
autodl_core_branch=develop
seetaas_frontend_branch=master
seetaas_backend_branch=master
kpl_stream_branch=master
#####################################
echo "删除image.list列表"
sleep 2
rm -rf $workspace/image.list
......@@ -10,7 +17,7 @@ rm -rf $workspace/seetaas
mkdir $workspace/seetaas/src -pv
cd $workspace/seetaas/src/
#################autodl-core################################################################
git clone git@gitlab.seetatech.com:autodl.com/autodl-core.git && cd autodl-core && git checkout develop && make build mode=dev || make build mode=dev && \
git clone git@gitlab.seetatech.com:autodl.com/autodl-core.git && cd autodl-core && git checkout $autodl_core_branch && make build mode=dev || make build mode=dev && \
docker build -f Dockerfile -t 10.12.4.15:5000/core/adl-core-v1:$now . && \
docker push 10.12.4.15:5000/core/adl-core-v1:$now && \
echo "10.12.4.15:5000/core/adl-core-v1:$now" >>$workspace/image.list
......@@ -22,7 +29,7 @@ docker push 10.12.4.15:5000/core/core--collector:$now && \
echo "10.12.4.15:5000/core/core--collector:$now">>$workspace/image.list \
################seetaash后端#####################################################################
cd $workspace/seetaas/src/
git clone git@gitlab.seetatech.com:seetaas.com/seetaas-backend.git && cd seetaas-backend && git checkout master && make build mode=dev || make build mode=dev && \
git clone git@gitlab.seetatech.com:seetaas.com/seetaas-backend.git && cd seetaas-backend && git checkout $seetaas_backend_branch && make build mode=dev || make build mode=dev && \
docker build -f Dockerfile -t 10.12.4.15:5000/seetaas/kpl-backend-v1:$now . && \
docker push 10.12.4.15:5000/seetaas/kpl-backend-v1:$now && \
echo "10.12.4.15:5000/seetaas/kpl-backend-v1:$now" >>$workspace/image.list && \
......@@ -37,13 +44,13 @@ docker push 10.12.4.15:5000/seetaas/kpl-manager-v1:$now && \
echo "10.12.4.15:5000/seetaas/kpl-manager-v1:$now" >>$workspace/image.list &&
#####################################seetaas前端###################################################
cd $workspace/seetaas/
git clone git@gitlab.seetatech.com:seetaas/seetaas-v3.git && cd seetaas-v3 && git checkout master && make build mode=dev || make build mode=dev && \
git clone git@gitlab.seetatech.com:seetaas/seetaas-v3.git && cd seetaas-v3 && git checkout $seetaas_frontend_branch && make build mode=dev || make build mode=dev && \
docker build -f Dockerfile -t 10.12.4.15:5000/seetaas/kpl--frontend:$now . && \
docker push 10.12.4.15:5000/seetaas/kpl--frontend:$now && \
echo "10.12.4.15:5000/seetaas/kpl--frontend:$now" >>$workspace/image.list
#######################################kpl stream ssh服务######################################################
cd $workspace/seetaas/src/
git clone git@gitlab.seetatech.com:seetaas.com/kpl-stream.git && cd kpl-stream && git checkout master && make build mode=dev || make build mode=dev && \
git clone git@gitlab.seetatech.com:seetaas.com/kpl-stream.git && cd kpl-stream && git checkout $kpl_stream_branch && make build mode=dev || make build mode=dev && \
docker build -f Dockerfile -t 10.12.4.15:5000/seetaas/kpl-stream-v1:$now . && \
docker push 10.12.4.15:5000/seetaas/kpl-stream-v1:$now && \
echo "10.12.4.15:5000/seetaas/kpl-stream-v1:$now" >>$workspace/image.list
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!