Fork to maintain patches against the official gitea for https://code.ceondo.com https://github.com/go-gitea/gitea

.drone.yml 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. workspace:
  2. base: /srv/app
  3. path: src/code.gitea.io/gitea
  4. clone:
  5. git:
  6. image: plugins/git:1
  7. depth: 50
  8. tags: true
  9. pipeline:
  10. build:
  11. image: webhippie/golang:edge
  12. pull: true
  13. environment:
  14. TAGS: bindata sqlite
  15. GOPATH: /srv/app
  16. commands:
  17. - apk -U add nodejs nodejs-npm
  18. - npm install
  19. - make clean
  20. - make generate
  21. - make vet
  22. - make lint
  23. - make fmt-check
  24. - make stylesheets-check
  25. - make misspell-check
  26. - make test-vendor
  27. - make build
  28. when:
  29. event: [ push, tag, pull_request ]
  30. test:
  31. image: webhippie/golang:edge
  32. pull: true
  33. group: test
  34. environment:
  35. TAGS: bindata sqlite
  36. GOPATH: /srv/app
  37. commands:
  38. - make unit-test-coverage
  39. when:
  40. event: [ push, pull_request ]
  41. branch: [ master ]
  42. test:
  43. image: webhippie/golang:edge
  44. pull: true
  45. group: test
  46. environment:
  47. TAGS: bindata
  48. GOPATH: /srv/app
  49. commands:
  50. - make test
  51. when:
  52. event: [ tag ]
  53. # Commented until db locking have been resolved!
  54. # test-sqlite:
  55. # image: webhippie/golang:edge
  56. # pull: true
  57. # group: test
  58. # environment:
  59. # TAGS: bindata
  60. # GOPATH: /srv/app
  61. # commands:
  62. # - make test-sqlite
  63. # when:
  64. # event: [ push, tag, pull_request ]
  65. test-mysql:
  66. image: webhippie/golang:edge
  67. pull: true
  68. group: test
  69. environment:
  70. TAGS: bindata
  71. GOPATH: /srv/app
  72. commands:
  73. - make integration-test-coverage
  74. when:
  75. event: [ push, pull_request ]
  76. branch: [ master ]
  77. test-mysql:
  78. image: webhippie/golang:edge
  79. pull: true
  80. group: test
  81. environment:
  82. TAGS: bindata
  83. GOPATH: /srv/app
  84. commands:
  85. - make test-mysql
  86. when:
  87. event: [ tag ]
  88. test-pgsql:
  89. image: webhippie/golang:edge
  90. pull: true
  91. group: test
  92. environment:
  93. TAGS: bindata
  94. GOPATH: /srv/app
  95. commands:
  96. - make test-pgsql
  97. when:
  98. event: [ push, tag, pull_request ]
  99. generate-coverage:
  100. image: webhippie/golang:edge
  101. pull: true
  102. environment:
  103. TAGS: bindata
  104. GOPATH: /srv/app
  105. commands:
  106. - make coverage
  107. when:
  108. event: [ push, pull_request ]
  109. branch: [ master ]
  110. coverage:
  111. image: robertstettner/drone-codecov
  112. secrets: [ codecov_token ]
  113. files:
  114. - coverage.all
  115. when:
  116. event: [ push, pull_request ]
  117. branch: [ master ]
  118. static:
  119. image: karalabe/xgo-latest:latest
  120. pull: true
  121. environment:
  122. TAGS: bindata sqlite
  123. GOPATH: /srv/app
  124. commands:
  125. - make release
  126. when:
  127. event: [ push, tag ]
  128. docker:
  129. image: plugins/docker:17.05
  130. pull: true
  131. secrets: [ docker_username, docker_password ]
  132. repo: gitea/gitea
  133. tags: [ '${DRONE_TAG##v}' ]
  134. when:
  135. event: [ tag ]
  136. branch: [ refs/tags/* ]
  137. docker:
  138. image: plugins/docker:17.05
  139. pull: true
  140. secrets: [ docker_username, docker_password ]
  141. repo: gitea/gitea
  142. tags: [ '${DRONE_BRANCH##release/v}' ]
  143. when:
  144. event: [ push ]
  145. branch: [ release/* ]
  146. docker:
  147. image: plugins/docker:17.05
  148. pull: true
  149. secrets: [ docker_username, docker_password ]
  150. repo: gitea/gitea
  151. tags: [ 'latest' ]
  152. when:
  153. event: [ push ]
  154. branch: [ master ]
  155. release:
  156. image: plugins/s3:1
  157. pull: true
  158. secrets: [ aws_access_key_id, aws_secret_access_key ]
  159. bucket: releases
  160. endpoint: https://storage.gitea.io
  161. path_style: true
  162. strip_prefix: dist/release/
  163. source: dist/release/*
  164. target: /gitea/${DRONE_TAG##v}
  165. when:
  166. event: [ tag ]
  167. branch: [ refs/tags/* ]
  168. release:
  169. image: plugins/s3:1
  170. pull: true
  171. secrets: [ aws_access_key_id, aws_secret_access_key ]
  172. bucket: releases
  173. endpoint: https://storage.gitea.io
  174. path_style: true
  175. strip_prefix: dist/release/
  176. source: dist/release/*
  177. target: /gitea/${DRONE_BRANCH##release/v}
  178. when:
  179. event: [ push ]
  180. branch: [ release/* ]
  181. release:
  182. image: plugins/s3:1
  183. pull: true
  184. secrets: [ aws_access_key_id, aws_secret_access_key ]
  185. bucket: releases
  186. endpoint: https://storage.gitea.io
  187. path_style: true
  188. strip_prefix: dist/release/
  189. source: dist/release/*
  190. target: /gitea/master
  191. when:
  192. event: [ push ]
  193. branch: [ master ]
  194. github:
  195. image: plugins/github-release:1
  196. pull: true
  197. files:
  198. - dist/release/*
  199. when:
  200. event: [ tag ]
  201. branch: [ refs/tags/* ]
  202. discord:
  203. image: appleboy/drone-discord:1.0.0
  204. pull: true
  205. secrets: [ discord_webhook_id, discord_webhook_token ]
  206. when:
  207. event: [ push, tag, pull_request ]
  208. status: [ changed, failure ]
  209. services:
  210. mysql:
  211. image: mysql:5.7
  212. environment:
  213. - MYSQL_DATABASE=test
  214. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  215. when:
  216. event: [ push, tag, pull_request ]
  217. pgsql:
  218. image: postgres:9.5
  219. environment:
  220. - POSTGRES_DB=test
  221. when:
  222. event: [ push, tag, pull_request ]