From b93fd856d8c9c5c90a04245e09f3e3b54b3421f1 Mon Sep 17 00:00:00 2001 From: jasder <2053003901@qq.com> Date: Fri, 2 Jul 2021 23:27:25 +0800 Subject: [PATCH] Update '.trustie-pipeline.yml' --- .trustie-pipeline.yml | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index c649a6e..8a1a1c6 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -1,36 +1,27 @@ -#pipeline + kind: pipeline type: docker -name: default +name: 开发流水线 platform: os: linux arch: amd64 steps: -- name: maven - image: maven:3-jdk-10 - commands: - - mvn install -DskipTests=true -- name: Docker镜像构建1 - image: plugins/docker - settings: - username: moshenglv - password: RL9UB5P7Jtzukka - repo: docker.io/moshenglv/demo - tags: latest -# 根据实际情况修改主机ip,账号,密码 +# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板) +# host、username、password可在参数管理中配置 - name: 远程主机部署 image: appleboy/drone-ssh settings: - host: 47.102.109.233 - username: root - password: 'msl123!@#' + host: + from_secret: ip + username: + from_secret: name + password: + from_secret: pwd port: 22 script: - - echo ====暂停容器======= - - docker rm -f demo - - docker rmi moshenglv/demo:latest - - echo ====拉取镜像======= - - docker pull moshenglv/demo:latest - - echo ====创建容器======= - - docker run -d -p 8080:8080 --name demo moshenglv/demo:latest - - echo ====部署成功====== + - echo "xxxxx" > /home/test +trigger: + branch: + - master + event: + - push