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

.drone.yml 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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. docker:
  137. image: plugins/docker:17.05
  138. pull: true
  139. secrets: [ docker_username, docker_password ]
  140. repo: gitea/gitea
  141. tags: [ '${DRONE_BRANCH##release/v}' ]
  142. when:
  143. event: [ push ]
  144. branch: [ release/* ]
  145. docker:
  146. image: plugins/docker:17.05
  147. pull: true
  148. secrets: [ docker_username, docker_password ]
  149. repo: gitea/gitea
  150. tags: [ 'latest' ]
  151. when:
  152. event: [ push ]
  153. branch: [ master ]
  154. release:
  155. image: plugins/s3:1
  156. pull: true
  157. secrets: [ aws_access_key_id, aws_secret_access_key ]
  158. bucket: releases
  159. endpoint: https://storage.gitea.io
  160. path_style: true
  161. strip_prefix: dist/release/
  162. source: dist/release/*
  163. target: /gitea/${DRONE_TAG##v}
  164. when:
  165. event: [ tag ]
  166. release:
  167. image: plugins/s3:1
  168. pull: true
  169. secrets: [ aws_access_key_id, aws_secret_access_key ]
  170. bucket: releases
  171. endpoint: https://storage.gitea.io
  172. path_style: true
  173. strip_prefix: dist/release/
  174. source: dist/release/*
  175. target: /gitea/${DRONE_BRANCH##release/v}
  176. when:
  177. event: [ push ]
  178. branch: [ release/* ]
  179. release:
  180. image: plugins/s3:1
  181. pull: true
  182. secrets: [ aws_access_key_id, aws_secret_access_key ]
  183. bucket: releases
  184. endpoint: https://storage.gitea.io
  185. path_style: true
  186. strip_prefix: dist/release/
  187. source: dist/release/*
  188. target: /gitea/master
  189. when:
  190. event: [ push ]
  191. branch: [ master ]
  192. github:
  193. image: plugins/github-release:1
  194. pull: true
  195. files:
  196. - dist/release/*
  197. when:
  198. event: [ tag ]
  199. discord:
  200. image: appleboy/drone-discord:1.0.0
  201. pull: true
  202. secrets: [ discord_webhook_id, discord_webhook_token ]
  203. when:
  204. event: [ push, tag, pull_request ]
  205. status: [ changed, failure ]
  206. services:
  207. mysql:
  208. image: mysql:5.7
  209. environment:
  210. - MYSQL_DATABASE=test
  211. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  212. when:
  213. event: [ push, tag, pull_request ]
  214. pgsql:
  215. image: postgres:9.5
  216. environment:
  217. - POSTGRES_DB=test
  218. when:
  219. event: [ push, tag, pull_request ]