.drone.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. kind: pipeline
  2. name: default
  3. steps:
  4. - name: restore-cache
  5. image: rpi.it5000.com:5000/drillster/drone-volume-cache
  6. volumes:
  7. - name: cache
  8. path: /cache
  9. settings:
  10. restore: true
  11. mount:
  12. - ./node_modules
  13. - name: build
  14. image: rpi.it5000.com:5000/node:16.15
  15. commands:
  16. - npm config set registry http://nexus.fast-fun.cn:92/repository/npm-public/
  17. - npm install
  18. - npm run build:prod
  19. - name: rebuild-cache
  20. image: rpi.it5000.com:5000/drillster/drone-volume-cache
  21. volumes:
  22. - name: cache
  23. path: /cache
  24. settings:
  25. rebuild: true
  26. mount:
  27. - ./node_modules
  28. - name: docker-web
  29. image: rpi.it5000.com:5000/plugins/docker
  30. privileged: true
  31. volumes:
  32. - name: docker
  33. path: /var/run/docker.sock
  34. commands:
  35. - docker build -t nas.fast-fun.cn:5000/zk/station-log-frontend:1.0.${DRONE_BUILD_NUMBER} -f Dockerfile .
  36. - docker push nas.fast-fun.cn:5000/zk/station-log-frontend:1.0.${DRONE_BUILD_NUMBER}
  37. volumes:
  38. - name: cache
  39. host:
  40. path: /home/drone/cache
  41. - name: docker
  42. host:
  43. path: /var/run/docker.sock