.drone.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. kind: pipeline
  2. name: default
  3. steps:
  4. - name: restore-cache
  5. image: rpi.it5000.com:5000/drillster/drone-volume-cache
  6. settings:
  7. restore: true
  8. mount:
  9. - ./repository
  10. volumes:
  11. - name: cache
  12. path: /cache
  13. - name: mvn-package
  14. image: rpi.it5000.com:5000/jaikuai/npm-mvn:rpi
  15. commands:
  16. - mvn clean package -Dmaven.test.skip=true -Dmaven.repo.local=./repository -s ./setting.xml
  17. - name: rebuild-cache
  18. image: rpi.it5000.com:5000/drillster/drone-volume-cache
  19. settings:
  20. rebuild: true
  21. mount:
  22. - ./repository
  23. volumes:
  24. - name: cache
  25. path: /cache
  26. - name: docker-build
  27. image: rpi.it5000.com:5000/docker:27
  28. settings:
  29. tags:
  30. - latest
  31. - 2.0.${DRONE_BUILD_NUMBER}
  32. registry: nas.fast-fun.cn:5000
  33. insecure: true
  34. repo: nas.fast-fun.cn:5000/zk/zhili-station-server
  35. - name: docker-build
  36. image: rpi.it5000.com:5000/docker:27
  37. privileged: true
  38. volumes:
  39. - name: docker
  40. path: /var/run/docker.sock
  41. commands:
  42. - docker build -t nas.fast-fun.cn:5000/zk/zhili-station-server:2.0.${DRONE_BUILD_NUMBER} -f Dockerfile .
  43. - docker push nas.fast-fun.cn:5000/zk/zhili-station-server:2.0.${DRONE_BUILD_NUMBER}
  44. volumes:
  45. - name: cache
  46. host:
  47. path: /home/drone/cache