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-8
  volumes:
    - name: cache 
      path: /root/.m2 
  commands:
  - mvn compile

- 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
      - cat /home/deploy.sh
trigger:
  branch:
  - master
  event:
  - push
  - pull_request
