| @@ -2,27 +2,32 @@ kind: pipeline | |||||
| type: docker | type: docker | ||||
| name: 1 | name: 1 | ||||
| platform: | platform: | ||||
| os: linuxs | |||||
| arch: amd64 | |||||
| os: linux | |||||
| arch: arm64 | |||||
| steps: | steps: | ||||
| - name: maven | - name: maven | ||||
| image: maven:3-jdk-10 | image: maven:3-jdk-10 | ||||
| volumes: | |||||
| - name: cache | |||||
| path: /root/.m2 | |||||
| commands: | commands: | ||||
| - mvn install -DskipTests=true | |||||
| - name: run | |||||
| image: maven:3-jdk-8 | |||||
| volumes: | |||||
| - name: cache | |||||
| path: /root/.m2 | |||||
| - mvn compile | |||||
| - name: maven | |||||
| image: maven:3-jdk-10 | |||||
| commands: | commands: | ||||
| - nohup mvn tomcat7:run & | |||||
| volumes: | |||||
| - name: cache | |||||
| host: | |||||
| path: /var/lib/cache | |||||
| - mvn test | |||||
| - name: 远程主机部署 | |||||
| image: appleboy/drone-ssh | |||||
| settings: | |||||
| host: | |||||
| from_secret: ip | |||||
| username: | |||||
| from_secret: name | |||||
| password: | |||||
| from_secret: pwd | |||||
| port: 22 | |||||
| script: | |||||
| - chmod +x /home/deploy.sh | |||||
| - ./home/deploy.sh | |||||
| trigger: | trigger: | ||||
| branch: | branch: | ||||
| - master | - master | ||||