.drone.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. kind: pipeline
  2. name: default
  3. steps:
  4. - name: restore-cache
  5. image: 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: jaikuai/npm-mvn
  15. commands:
  16. - npm config set registry https://registry.npm.taobao.org && npm install
  17. - npm run build:prod
  18. - name: rebuild-cache
  19. image: drillster/drone-volume-cache
  20. volumes:
  21. - name: cache
  22. path: /cache
  23. settings:
  24. rebuild: true
  25. mount:
  26. - ./node_modules
  27. - name: docker
  28. image: plugins/docker
  29. settings:
  30. tags:
  31. - latest
  32. - 1.2.${DRONE_BUILD_NUMBER}
  33. registry: nas.fast-fun.cn:5000
  34. insecure: true
  35. repo: nas.fast-fun.cn:5000/zhl/pdms-oss-ui
  36. # - name: deploy
  37. # image: appleboy/drone-ssh
  38. # settings:
  39. # host: 192.168.0.41
  40. # username: zhl
  41. # password: 123456
  42. # script:
  43. # - docker rm -f oss-ui
  44. # - docker rmi -f nas.fast-fun.cn:5000/zhl/pdms-oss-ui
  45. # - docker run -d --name oss-ui --link oss-api:pdms-oss-api -l traefik.port=80 --restart=always nas.fast-fun.cn:5000/zhl/pdms-oss-ui
  46. volumes:
  47. - name: cache
  48. host:
  49. path: /home/drone/cache