.drone.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. ---
  2. kind: pipeline
  3. type: ssh
  4. name: Ubuntu | Nginx + Apache2
  5. concurrency:
  6. limit: 1
  7. server:
  8. host:
  9. from_secret: server_address
  10. user:
  11. from_secret: username
  12. ssh_key:
  13. from_secret: ssh_key
  14. platform:
  15. os: linux
  16. arch: amd64
  17. steps:
  18. - name: Download submodules
  19. image: alpine/git
  20. commands:
  21. - git submodule update --init --recursive
  22. - name: Build Hestia package and install
  23. commands:
  24. - ./src/hst_autocompile.sh --hestia --install '~localsrc'
  25. - name: Reset Web templates
  26. commands:
  27. - rm /usr/local/hestia/data/templates/web/nginx/php-fpm/*.*
  28. - rm /usr/local/hestia/data/templates/web/nginx/*.*
  29. - rm /usr/local/hestia/data/templates/web/apache2/php-fpm/*.*
  30. - rm /usr/local/hestia/data/templates/web/apache2/*.*
  31. - rm /usr/local/hestia/data/templates/web/php-fpm/*.*
  32. - /usr/local/hestia/bin/v-update-web-templates
  33. - name: Run system / user tests
  34. commands:
  35. - bats ./test/test.bats
  36. - name: Run restore tests
  37. commands:
  38. - bats ./test/restore.bats
  39. - name: Run config tests
  40. commands:
  41. - bats ./test/config-tests.bats
  42. trigger:
  43. event: [pull_request, push]
  44. ref:
  45. - refs/heads/release
  46. - refs/heads/prerelease
  47. - refs/heads/servicing
  48. - refs/heads/tests/*
  49. - refs/heads/main
  50. - refs/pull/*/head
  51. ---
  52. kind: pipeline
  53. type: ssh
  54. name: Debian | Nginx
  55. concurrency:
  56. limit: 1
  57. server:
  58. host:
  59. from_secret: server_address2
  60. user:
  61. from_secret: username
  62. ssh_key:
  63. from_secret: ssh_key
  64. platform:
  65. os: linux
  66. arch: amd64
  67. steps:
  68. - name: Download submodules
  69. image: alpine/git
  70. commands:
  71. - git submodule update --init --recursive
  72. - name: Build Hestia package install
  73. commands:
  74. - ./src/hst_autocompile.sh --hestia --install '~localsrc'
  75. - name: Reset Web templates
  76. commands:
  77. - rm /usr/local/hestia/data/templates/web/nginx/php-fpm/*.*
  78. - rm /usr/local/hestia/data/templates/web/nginx/*.*
  79. - rm /usr/local/hestia/data/templates/web/apache2/php-fpm/*.*
  80. - rm /usr/local/hestia/data/templates/web/apache2/*.*
  81. - rm /usr/local/hestia/data/templates/web/php-fpm/*.*
  82. - /usr/local/hestia/bin/v-update-web-templates
  83. - name: Run system / user tests
  84. commands:
  85. - bats ./test/test.bats
  86. - name: Run restore tests
  87. commands:
  88. - bats ./test/restore.bats
  89. - name: Run config tests
  90. commands:
  91. - bats ./test/config-tests.bats
  92. - name: Run Letsencrypt test against Staging
  93. commands:
  94. - cp /root/le-env.sh /tmp/hestia-le-env.sh
  95. - bats ./test/letsencrypt.bats
  96. trigger:
  97. event: [pull_request, push]
  98. ref:
  99. - refs/heads/release
  100. - refs/heads/prerelease
  101. - refs/heads/servicing
  102. - refs/heads/tests/*
  103. - refs/heads/main
  104. - refs/pull/*/head
  105. ---
  106. kind: pipeline
  107. type: docker
  108. name: Push to beta atp server
  109. platform:
  110. os: linux
  111. arch: amd64
  112. steps:
  113. - name: Build JS/CSS
  114. image: node:current-slim
  115. commands:
  116. - npm ci --ignore-scripts
  117. - npm run build
  118. - name: Build
  119. image: debian:bullseye
  120. commands:
  121. - ln -snf /etc/localtime && echo CET > /etc/timezone
  122. - ./src/hst_autocompile.sh --dontinstalldeps --hestia --debug --cross --noinstall --keepbuild '~localsrc'
  123. - mkdir -p ./hestia/
  124. - mv /tmp/hestiacp-src/deb/*.deb ./hestia/
  125. - name: Upload
  126. image: appleboy/drone-scp
  127. settings:
  128. host:
  129. from_secret: apt_server
  130. user: root
  131. key:
  132. from_secret: ssh_key
  133. port: 22
  134. command_timeout: 2m
  135. target: /root/
  136. source:
  137. - ./hestia/*
  138. trigger:
  139. event: [promote]