#! /bin/bash
WORKDIR=/root/shengruikou/
cd $WORKDIR

# 如果不存在eurekaserverdemo目录
if [ ! -d "eurekaserverdemo" ]; then
echo "eurekaserverdemo not exists"
git clone git@github.com:koushr/eurekaserverdemo.git
fi
cd eurekaserverdemo
oldcommitid=`git rev-parse HEAD`
git pull
newcommitid=`git rev-parse HEAD`
if [[ "$oldcommitid" != "$newcommitid" || ! -f "target/" ]]; then
mvn clean package
fi
cp fsf.jar $WORKDIR


if [[ ! -d "/root/shengruikou/med" || ! -d "/root/shengruikou/med2" ]]; then
echo ""
else
echo "reuse old so files"
fi


find /root/shengruikou/p -name "*.py" ! -name "__init__.py" | xargs rm -rf


docker build -t 2p:0.1.4 -f /root/shengruikou/Dockerfile .
cat /root/shengruikou/password.txt | docker login --username shengruikou --password-stdin xxx.com
docker push 2p:0.1.4

相关文章:

  • 2021-11-04
  • 2022-12-23
  • 2021-12-17
  • 2021-11-04
  • 2022-01-14
  • 2022-01-01
  • 2022-01-25
  • 2022-12-23
猜你喜欢
  • 2021-11-26
  • 2021-09-16
  • 2022-01-12
  • 2021-12-13
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
相关资源
相似解决方案