.drone.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 registry.dev.fast-fun.cn:82/zk/zhili-station-server:2.0.${DRONE_BUILD_NUMBER} -f Dockerfile .
  34. - docker push registry.dev.fast-fun.cn:82/zk/zhili-station-server:2.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