Update '.trustie-pipeline.yml'
continuous-integration/drone/push Build is passing Details

develop
p47623895 4 years ago
parent 2ed89810b2
commit aaa8d920f2

@ -9,8 +9,8 @@ steps:
- name: maven - name: maven
image: maven:3-jdk-10 image: maven:3-jdk-10
commands: commands:
- ls - cd visualization
- mvn clean package
# 本模板示例为上传软件包和部署脚本到home目录 # 本模板示例为上传软件包和部署脚本到home目录
# host、username、password可在参数管理中配置 # host、username、password可在参数管理中配置
- name: 上传文件 - name: 上传文件
@ -40,11 +40,13 @@ steps:
port: 52222 port: 52222
script: script:
- echo ====暂停容器开始11======= - echo ====暂停容器开始11=======
- docker rm -f mo-test
- docker rmi mo-test:1.0
- cd /opt/visualization - cd /opt/visualization
- tomcat=$(netstat -nlp | grep :8080 | awk '{print $7}' | awk -F"/" '{ print $1 }') - echo ====开始部署=======
- kill -9 $tomcat >/dev/null 2>&1 - docker build -t mo-test:1.0 .
- ls - docker run -d -p 8080:8080 --name mo-test mo-test:1.0
- mvn clean package - pwd
- java -jar target/demo-0.0.1-SNAPSHOT.jar - java -jar target/demo-0.0.1-SNAPSHOT.jar
- echo ====部署成功====== - echo ====部署成功======
trigger: trigger:

Loading…
Cancel
Save