Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

86 řádky
1.8KB

  1. kind: pipeline
  2. type: docker
  3. name: build_publish
  4. steps:
  5. - name: photos-client
  6. image: node:21.2.0
  7. commands:
  8. - cd client
  9. - npm ci
  10. - npm run build
  11. - echo "latest,${DRONE_BUILD_NUMBER}" > .tags
  12. - name: photos-admin-client
  13. image: node:21.2.0
  14. commands:
  15. - cd admin-client
  16. - npm ci
  17. - npm run build
  18. - echo "latest,${DRONE_BUILD_NUMBER}" > .tags
  19. - name: server
  20. image: node:21.2.0
  21. commands:
  22. - cd server
  23. - npm ci
  24. - npm run build
  25. - echo "latest,${DRONE_BUILD_NUMBER}" > .tags
  26. - name: publish-api
  27. image: plugins/docker
  28. settings:
  29. username:
  30. from_secret: docker_username
  31. password:
  32. from_secret: docker_password
  33. repo: registry-api.novox.be/novox/photos-server
  34. registry: registry-api.novox.be
  35. context: ./server
  36. dockerfile: ./server/Dockerfile
  37. depends_on:
  38. - server
  39. - name: publish-photos-client
  40. image: plugins/docker
  41. settings:
  42. username:
  43. from_secret: docker_username
  44. password:
  45. from_secret: docker_password
  46. repo: registry-api.novox.be/novox/photos-client
  47. registry: registry-api.novox.be
  48. context: ./client
  49. dockerfile: ./client/Dockerfile
  50. depends_on:
  51. - photos-client
  52. - name: publish-photos-admin-client
  53. image: plugins/docker
  54. settings:
  55. username:
  56. from_secret: docker_username
  57. password:
  58. from_secret: docker_password
  59. repo: registry-api.novox.be/novox/photos-admin-client
  60. registry: registry-api.novox.be
  61. context: ./admin-client
  62. dockerfile: ./admin-client/Dockerfile
  63. depends_on:
  64. - photos-admin-client
  65. trigger:
  66. branch:
  67. - master
  68. ---
  69. kind: pipeline
  70. type: exec
  71. name: deploy
  72. steps:
  73. - name: deploy
  74. commands:
  75. - systemctl restart dc@photos.novox.be
  76. depends_on:
  77. - build_publish