From 50b407c849ab5a43235b5fa3dcffdc2b0e5846ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E7=BA=A7=E4=BA=91=E8=84=91=E7=A0=94=E5=8F=91?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=B8=88?= <153692773@qq.com> Date: Thu, 8 Jun 2023 14:13:06 +0800 Subject: [PATCH] update pipeline for master branch --- .drone.yml | 95 +++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/.drone.yml b/.drone.yml index c52692e..29f7b70 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,47 +1,48 @@ -kind: pipeline -type: docker -name: masterpipe -platform: - os: linux - arch: arm64 - -volumes: - - name: cache - host: - path: /var/lib/cache -steps: -- name: maven - image: maven:3-jdk-10 - volumes: - - name: cache - path: /root/.m2 - commands: - - mvn compile -- name: test - image: maven:3-jdk-10 - volumes: - - name: cache - path: /root/.m2 - commands: - - mvn test - -- name: 远程主机部署 - image: appleboy/drone-ssh:linux-arm64 - settings: - host: - from_secret: ip - username: - from_secret: name - password: - from_secret: pwd - port: 22 - script: - - chmod +x /home/deploy.sh - - nohup bash /home/deploy.sh & - -trigger: - branch: - - master - event: - - push - - pull_request +kind: pipeline +type: docker +name: masterpipe +platform: + os: linux + arch: arm64 + +clone: + disable: true + +steps: +- name: maven + image: maven:3-jdk-8 + volumes: + - name: maven-build + path: /tmp/testDrone + commands: + - git clone http://wangwei:zq123456@10.16.22.23:43001/wangwei10061/jsxdemo.git + - cd jsxdemo + - ls + - cp README.md /tmp/testDrone/demoREADME.md + - cd /tmp/testDrone + - ls + +- name: 远程主机部署 + image: appleboy/drone-ssh:linux-arm64 + settings: + host: + from_secret: SECRET_IP + username: root + password: + from_secret: SECRET_PWD + port: 22 + script: + - cd /tmp/testDrone + - ls + +volumes: + - name: maven-build + host: + path: /tmp/testDrone + +trigger: + branch: + - master + event: + - push + - pull_request \ No newline at end of file