From a234be8c8dc600cec28249ee3d2d2e9e10efd922 Mon Sep 17 00:00:00 2001 From: m53297601 <2053003901@qq.com> Date: Thu, 1 Apr 2021 16:47:17 +0800 Subject: [PATCH] Update '.trustie-pipeline.yml' --- .trustie-pipeline.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index 485d548..cad4abe 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -10,15 +10,6 @@ steps: image: maven:3-jdk-10 commands: - mvn install -DskipTests=true -# 构建Docker镜像并推送到仓库 -# 定义镜像Hub路径以及账号密码 -- name: Docker镜像构建 - image: plugins/docker - settings: - username: username - password: pwd - repo: repoUrl - tags: latest # 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板) # host、username、password可在参数管理中配置 - name: 远程主机部署 @@ -32,9 +23,13 @@ steps: from_secret: deploy_pwd port: 22 script: - - echo ====暂停容器======= - - docker rm -f demo - - docker run -d -p 8080:8080 --name demo demo:1.0 + - echo ====暂停容器开始11======= + - docker rm -f mo-test + - docker rmi mo-test:1.0 + - cd /opt/demo + - echo ====开始部署======= + - docker build -t mo-test:1.0 . + - docker run -d -p 8080:8080 --name mo-test mo-test:1.0 - echo ====部署成功====== trigger: branch: