.drone.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. privileged: true
  29. volumes:
  30. - name: docker
  31. path: /var/run/docker.sock
  32. commands:
  33. - docker build -t nas.fast-fun.cn:5000/zk/station-control-tts:1.0.${DRONE_BUILD_NUMBER} -f Dockerfile .
  34. - docker push nas.fast-fun.cn:5000/zk/station-control-tts:1.0.${DRONE_BUILD_NUMBER}
  35. volumes:
  36. - name: cache
  37. host:
  38. path: /home/drone/cache
  39. - name: docker
  40. host:
  41. path: /var/run/docker.sock