diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index 1c6587e..708299a 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -35,14 +35,14 @@ steps: port: 52222 script: - echo ====暂停容器开始11======= - - docker rm -f mo-test - - docker rmi mo-test:1.0 - cd /opt/visualization - - echo ====开始部署======= - - docker build -t mo-test:1.0 . - - docker run -d -p 8080:8080 --name mo-test mo-test:1.0 + - tomcat=$(netstat -nlp | grep :8080 | awk '{print $7}' | awk -F"/" '{ print $1 }') + - if [ -z "${tomcat}" ]; then echo 1 > test.log else kill -9 $tomcat fi - mvn clean package - - java -jar target/demo-0.0.1-SNAPSHOT.jar + - nohup java -jar demo-0.0.1-SNAPSHOT.jar >a.log 2>&1 & + - sleep 8s + - springboot=$(netstat -nlp | grep :8080 | awk '{print $7}' | awk -F"/" '{ print $1 }') + - if [ -z "${springboot}" ]; then cat a.log fi - echo ====部署成功====== trigger: branch: