From aaa8d920f2c382a182f0bc1844eab2e179411357 Mon Sep 17 00:00:00 2001 From: p47623895 <18235900245@163.com> Date: Fri, 9 Apr 2021 11:33:46 +0800 Subject: [PATCH] Update '.trustie-pipeline.yml' --- .trustie-pipeline.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index e117f8f..82f2d2e 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -9,8 +9,8 @@ steps: - name: maven image: maven:3-jdk-10 commands: - - ls - + - cd visualization + - mvn clean package # 本模板示例为上传软件包和部署脚本到home目录 # host、username、password可在参数管理中配置 - name: 上传文件 @@ -40,11 +40,13 @@ steps: port: 52222 script: - echo ====暂停容器开始11======= + - docker rm -f mo-test + - docker rmi mo-test:1.0 - cd /opt/visualization - - tomcat=$(netstat -nlp | grep :8080 | awk '{print $7}' | awk -F"/" '{ print $1 }') - - kill -9 $tomcat >/dev/null 2>&1 - - ls - - mvn clean package + - echo ====开始部署======= + - docker build -t mo-test:1.0 . + - docker run -d -p 8080:8080 --name mo-test mo-test:1.0 + - pwd - java -jar target/demo-0.0.1-SNAPSHOT.jar - echo ====部署成功====== trigger: