From 421623ee61d684da365e06ec3b473fd25281d18f Mon Sep 17 00:00:00 2001 From: m53297601 <2053003901@qq.com> Date: Tue, 8 Aug 2023 09:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=AD=A5=E9=AA=A4=E7=9A=84=E7=AB=AF=E5=8F=A3=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .trustie-pipeline.yml | 96 +++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index ac8626e..2f57dac 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -1,49 +1,49 @@ -kind: pipeline -type: docker -name: 开发流水线 -platform: - os: linux - arch: amd64 -steps: -- name: maven - image: maven:3-jdk-10 - commands: - - mvn install -DskipTests=true -# 本模板示例为上传软件包和部署脚本到home目录 -# host、username、password可在参数管理中配置 -- name: 上传文件 - image: appleboy/drone-scp - settings: - host: - from_secret: deploy_ip - username: - from_secret: deploy_name - password: - from_secret: deploy_pwd - port: 3522 - command_timeout: 2m - target: /opt/demo - source: - - target/*.war - - Dockerfile -# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板) -# host、username、password可在参数管理中配置 -- name: 远程主机部署 - image: appleboy/drone-ssh - settings: - host: - from_secret: deploy_ip - username: - from_secret: deploy_name - password: - from_secret: deploy_pwd - port: 3522 - script: - - 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 +kind: pipeline +type: docker +name: 开发流水线 +platform: + os: linux + arch: amd64 +steps: +- name: maven + image: maven:3-jdk-10 + commands: + - mvn install -DskipTests=true +# 本模板示例为上传软件包和部署脚本到home目录 +# host、username、password可在参数管理中配置 +- name: 上传文件 + image: appleboy/drone-scp + settings: + host: + from_secret: deploy_ip + username: + from_secret: deploy_name + password: + from_secret: deploy_pwd + port: 22 + command_timeout: 2m + target: /opt/demo + source: + - target/*.war + - Dockerfile +# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板) +# host、username、password可在参数管理中配置 +- name: 远程主机部署 + image: appleboy/drone-ssh + settings: + host: + from_secret: deploy_ip + username: + from_secret: deploy_name + password: + from_secret: deploy_pwd + port: 3522 + script: + - 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 ====部署成功====== \ No newline at end of file