You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.drone.yml 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. kind: pipeline
  2. name: default
  3. steps:
  4. - name: versioning
  5. image: node:12
  6. commands:
  7. - echo $DRONE_BUILD_CREATED
  8. - git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
  9. - git config --global user.name "${DRONE_COMMIT_AUTHOR}"
  10. - git commit -A -m "Drone tagged as ${DRONE_TAG}"
  11. - git tag "${DRONE_TAG}"
  12. - git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-docs/${DRONE_REPO_NAME}.git master ${DRONE_TAG}
  13. environment:
  14. GIT_USER:
  15. from_secret: git_user
  16. GIT_PASSWORD:
  17. from_secret: git_password
  18. trigger:
  19. event:
  20. exclude:
  21. - tag
  22. - name: restore cache
  23. image: drillster/drone-volume-cache
  24. settings:
  25. restore: true
  26. mount:
  27. - ./node_modules
  28. volumes:
  29. - name: cache
  30. path: /cache
  31. - name: npm install
  32. image: node:12
  33. commands:
  34. - npm install
  35. - name: npm run build
  36. image: node:12
  37. commands:
  38. - npm run build
  39. - name: rebuild cache
  40. image: drillster/drone-volume-cache
  41. settings:
  42. rebuild: true
  43. mount:
  44. - ./node_modules
  45. volumes:
  46. - name: cache
  47. path: /cache
  48. - name: npm run test
  49. image: node:12
  50. commands:
  51. - npm run test
  52. - name: rebuild documentation
  53. image: node:12
  54. commands:
  55. - rm -rf docs
  56. - npm run docs
  57. trigger:
  58. event:
  59. - tag
  60. - name: npm publish
  61. image: plugins/npm
  62. settings:
  63. username: frontwork
  64. password:
  65. from_secret: npm_password
  66. email: frontwork.me@gmail.com
  67. trigger:
  68. event:
  69. - tag
  70. - name: commit documentation
  71. image: node:12
  72. commands:
  73. - git config --global user.email "frontwork.me@gmail.com"
  74. - git config --global user.name "drone"
  75. - git add -f docs
  76. - git commit --allow-empty -m "documented version at ${DRONE_BUILD_CREATED}"
  77. - git tag ${DRONE_BUILD_CREATED}
  78. - git status
  79. - git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git master ${DRONE_BUILD_CREATED}
  80. environment:
  81. GIT_USER:
  82. from_secret: git_user
  83. GIT_PASSWORD:
  84. from_secret: git_password
  85. trigger:
  86. event:
  87. - tag
  88. volumes:
  89. - name: cache
  90. host:
  91. path: /tmp