1.配置svn地址
svn://www.xxx.xxx/xxx-vue
账号和密码
2.构建pom.xml
Root POM : pom.xml
Goals and options: clean -DskipTests=true install
3.执行shell
cd /home/jenkins/workspace/xxx-java
rm -rf dist
rm -rf app
cd /home/zip/apache-tomcat-8.5.47/webapps
cp -r dist /home/jenkins/workspace/xxx-java/dist
cd /home/zip/apache-tomcat-8.5.47/webapps
cp -r app /home/jenkins/workspace/xxx-java/app
cd /home/jenkins/workspace/xxx-java/target
cp zsy-xxx.war /home/jenkins/workspace/xxx-java/
docker build -t zsyxxx /home/jenkins/workspace/xxx-java
docker ps
docker stop zsyxxx
docker rm zsyxxx
docker run -d -p 8080:8080 --restart=always -v /home/tomcat/logs:/usr/local/tomcat/logs -v /home/tomcat/file-data:/home/file-data -v /etc/timezone:/etc/timezone -v /etc/localtime:/etc/localtime --name zsyxxx zsyxxx
相关文章
猜你喜欢