标题 一进入jenkins
点击新建任务
在此选择任务类型和任务名称
配置git
cd /root/.jenkins/workspace/springboot/test
mvn clean install -DskipTests
cp target/test-0.0.1-SNAPSHOT.jar docker
cd docker
docker build -f Dockerfile -t "springboot:dev" . --no-cache
docker ps -a | grep springboot | grep dev | awk '{print $1}' | xargs -i docker stop {} | xargs -I docker rm {}
docker stop springboot
docker rm springboot
docker run -d -p 8080:8080 --name springboot springboot:dev