Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

.drone.yml 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: default
  5. steps:
  6. - name: build created
  7. image: alpine
  8. commands:
  9. - echo ${DRONE_BUILD_CREATED}
  10. - name: restore cache
  11. image: drillster/drone-volume-cache
  12. settings:
  13. restore: true
  14. mount:
  15. - ./node_modules
  16. volumes:
  17. - name: cache
  18. path: /cache
  19. - name: npm install
  20. image: node:12
  21. commands:
  22. - npm install
  23. - name: npm run build
  24. image: node:12
  25. commands:
  26. - npm run build
  27. - name: rebuild cache
  28. image: drillster/drone-volume-cache
  29. settings:
  30. rebuild: true
  31. mount:
  32. - ./node_modules
  33. volumes:
  34. - name: cache
  35. path: /cache
  36. - name: deliver dist
  37. image: node:12
  38. commands:
  39. - echo ${DRONE_BUILD_CREATED}
  40. - git clone https://www.versioncontrol.me/frontwork-distribution/${DRONE_REPO_NAME}.git; cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../dist/* .; cp ../LICENSE.md .
  41. - git add --all; git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
  42. - (git tag ${DRONE_TAG} && git push --force https://$GIT_USER:$GIT_PASSWORD@www.versioncontrol.me/frontwork-distribution/${DRONE_REPO_NAME}.git master ${DRONE_TAG}) || true
  43. environment:
  44. GIT_USER:
  45. from_secret: git_user
  46. GIT_PASSWORD:
  47. from_secret: git_password
  48. when:
  49. event:
  50. - tag
  51. - name: deliver container
  52. image: plugins/docker
  53. settings:
  54. registry: registry.conatum.eu
  55. insecure: true
  56. repo: registry.conatum.eu/frontwork/admin
  57. tags: ${DRONE_BUILD_CREATED}
  58. - name: release container
  59. image: plugins/docker
  60. settings:
  61. repo: frontwork/admin
  62. tags: ${DRONE_TAG}
  63. username: frontwork
  64. password:
  65. from_secret: docker_password
  66. when:
  67. event:
  68. - tag
  69. volumes:
  70. - name: cache
  71. host:
  72. path: /tmp