| @@ -1,44 +1,27 @@ | |||||
| kind: pipeline | kind: pipeline | ||||
| type: docker | type: docker | ||||
| name: masterpipe | |||||
| name: 1 | |||||
| platform: | platform: | ||||
| os: linux | os: linux | ||||
| arch: arm64 | arch: arm64 | ||||
| volumes: | |||||
| - name: cache | |||||
| host: | |||||
| path: /var/lib/cache | |||||
| steps: | steps: | ||||
| - name: maven | - name: maven | ||||
| image: maven:3-jdk-10 | image: maven:3-jdk-10 | ||||
| volumes: | volumes: | ||||
| - name: cache | |||||
| path: /root/.m2 | |||||
| - name: cache | |||||
| path: /root/.m2 | |||||
| commands: | commands: | ||||
| - mvn compile | - mvn compile | ||||
| - name: test | |||||
| image: maven:3-jdk-10 | |||||
| volumes: | |||||
| - name: cache | |||||
| path: /root/.m2 | |||||
| commands: | |||||
| - mvn test | |||||
| - name: 远程主机部署 | |||||
| image: appleboy/drone-ssh | |||||
| - name: check ansible syntax | |||||
| image: plugins/ansible:3 | |||||
| settings: | settings: | ||||
| host: | |||||
| from_secret: ip | |||||
| username: | |||||
| from_secret: name | |||||
| password: | |||||
| from_secret: pwd | |||||
| port: 22 | |||||
| script: | |||||
| - chmod +x /home/deploy.sh | |||||
| - ./home/deploy.sh | |||||
| playbook: ansible/playbook.yml | |||||
| galaxy: ansible/requirements.yml | |||||
| inventory: ansible/inventory | |||||
| syntax_check: true | |||||
| trigger: | trigger: | ||||
| branch: | branch: | ||||
| - master | |||||
| - ansible | |||||
| event: | event: | ||||
| - push | |||||
| - pull_request | |||||
| - cron | |||||