From 41f81a31ec17e32f8b125fce00735c735fd92139 Mon Sep 17 00:00:00 2001 From: okk <153692773@qq.com> Date: Tue, 31 Jan 2023 17:38:05 +0800 Subject: [PATCH] update pipeline for master branch --- .drone.yml | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3793962..6d72770 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,11 +1,43 @@ + kind: pipeline type: docker -name: default +name: 1 +platform: + os: linux + arch: amd64 + +workspace: + base: /opt/workspace + path: work + +volumes: +- name: m2 + host: + path: /root/.m2 steps: - - name: ping - image: redis - commands: - - redis-cli -h cache ping -services: - - name: cache - image: redis \ No newline at end of file + +- name: maven + image: maven:3-jdk-10 + volumes: + - name: m2 + path: /root/.m2 + commands: + - mvn package + +- name: ssh-deploy + image: appleboy/drone-ssh + settings: + host: + - 113.246.243.98 + username: root + password: + from_secret: wang199637 + port: 4221 + command_timeout: 2m + script: + - docker run -v target/webssh.war:/usr/local/tomcat/webapps -d tomcat +trigger: + branch: + - master + event: + - push