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

.drone.yml 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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. download_translations:
  11. image: jonasfranz/crowdin
  12. pull: true
  13. secrets: [ crowdin_key ]
  14. project_identifier: gitea
  15. ignore_branch: true
  16. download: true
  17. export_dir: options/locale/
  18. when:
  19. event: [ push ]
  20. branch: [ master ]
  21. update-translations:
  22. image: alpine:3.6
  23. commands:
  24. - mv ./options/locale/locale_en-US.ini ./options/
  25. - sed -i -e 's/="/=/g' -e 's/"$$//g' ./options/locale/*.ini
  26. - sed -i -e 's/\\\\"/"/g' ./options/locale/*.ini
  27. - mv ./options/locale_en-US.ini ./options/locale/
  28. when:
  29. event: [ push ]
  30. branch: [ master ]
  31. git_push:
  32. image: appleboy/drone-git-push
  33. pull: true
  34. secrets: [ git_push_ssh_key ]
  35. remote: git@github.com:go-gitea/gitea.git
  36. force: false
  37. commit: true
  38. commit_message: "[skip ci] Updated translations via Crowdin"
  39. author_name: GiteaBot
  40. author_email: teabot@gitea.io
  41. when:
  42. event: [ push ]
  43. branch: [ master ]
  44. pre-build:
  45. image: webhippie/nodejs:latest
  46. pull: true
  47. commands:
  48. - npm install
  49. - make stylesheets-check
  50. when:
  51. event: [ push, tag, pull_request ]
  52. build:
  53. image: webhippie/golang:edge
  54. pull: true
  55. environment:
  56. TAGS: bindata sqlite
  57. GOPATH: /srv/app
  58. commands:
  59. - make clean
  60. - make generate
  61. - make vet
  62. - make lint
  63. - make fmt-check
  64. - make misspell-check
  65. - make test-vendor
  66. - make build
  67. when:
  68. event: [ push, tag, pull_request ]
  69. test:
  70. image: webhippie/golang:edge
  71. pull: true
  72. group: test
  73. environment:
  74. TAGS: bindata sqlite
  75. GOPATH: /srv/app
  76. commands:
  77. - make unit-test-coverage
  78. when:
  79. event: [ push, pull_request ]
  80. branch: [ master ]
  81. test:
  82. image: webhippie/golang:edge
  83. pull: true
  84. group: test
  85. environment:
  86. TAGS: bindata
  87. GOPATH: /srv/app
  88. commands:
  89. - make test
  90. when:
  91. event: [ tag ]
  92. # Commented until db locking have been resolved!
  93. # test-sqlite:
  94. # image: webhippie/golang:edge
  95. # pull: true
  96. # group: test
  97. # environment:
  98. # TAGS: bindata
  99. # GOPATH: /srv/app
  100. # commands:
  101. # - make test-sqlite
  102. # when:
  103. # event: [ push, tag, pull_request ]
  104. test-mysql:
  105. image: webhippie/golang:edge
  106. pull: true
  107. group: test
  108. environment:
  109. TAGS: bindata
  110. GOPATH: /srv/app
  111. commands:
  112. - make integration-test-coverage
  113. when:
  114. event: [ push, pull_request ]
  115. branch: [ master ]
  116. test-mysql:
  117. image: webhippie/golang:edge
  118. pull: true
  119. group: test
  120. environment:
  121. TAGS: bindata
  122. GOPATH: /srv/app
  123. commands:
  124. - make test-mysql
  125. when:
  126. event: [ tag ]
  127. test-pgsql:
  128. image: webhippie/golang:edge
  129. pull: true
  130. group: test
  131. environment:
  132. TAGS: bindata
  133. GOPATH: /srv/app
  134. commands:
  135. - make test-pgsql
  136. when:
  137. event: [ push, tag, pull_request ]
  138. generate-coverage:
  139. image: webhippie/golang:edge
  140. pull: true
  141. environment:
  142. TAGS: bindata
  143. GOPATH: /srv/app
  144. commands:
  145. - make coverage
  146. when:
  147. event: [ push, pull_request ]
  148. branch: [ master ]
  149. coverage:
  150. image: robertstettner/drone-codecov
  151. secrets: [ codecov_token ]
  152. files:
  153. - coverage.all
  154. when:
  155. event: [ push, pull_request ]
  156. branch: [ master ]
  157. static:
  158. image: karalabe/xgo-latest:latest
  159. pull: true
  160. environment:
  161. TAGS: bindata sqlite
  162. GOPATH: /srv/app
  163. commands:
  164. - make release
  165. when:
  166. event: [ push, tag ]
  167. build_docs:
  168. image: webhippie/hugo:latest
  169. pull: true
  170. commands:
  171. - cd docs
  172. - make trans-copy
  173. - make clean
  174. - make build
  175. docker_docs:
  176. image: plugins/docker:17.05
  177. pull: true
  178. secrets: [ docker_username, docker_password ]
  179. repo: gitea/docs
  180. context: docs
  181. dockerfile: docs/Dockerfile
  182. tags: [ '${DRONE_BRANCH##release/v}' ]
  183. when:
  184. event: [ push ]
  185. branch: [ release/* ]
  186. docker_docs:
  187. image: plugins/docker:17.05
  188. pull: true
  189. secrets: [ docker_username, docker_password ]
  190. repo: gitea/docs
  191. context: docs
  192. dockerfile: docs/Dockerfile
  193. tags: [ 'latest' ]
  194. when:
  195. event: [ push ]
  196. branch: [ master ]
  197. docker:
  198. image: plugins/docker:17.05
  199. pull: true
  200. secrets: [ docker_username, docker_password ]
  201. repo: gitea/gitea
  202. tags: [ '${DRONE_TAG##v}' ]
  203. when:
  204. event: [ tag ]
  205. docker:
  206. image: plugins/docker:17.05
  207. pull: true
  208. secrets: [ docker_username, docker_password ]
  209. repo: gitea/gitea
  210. tags: [ '${DRONE_BRANCH##release/v}' ]
  211. when:
  212. event: [ push ]
  213. branch: [ release/* ]
  214. docker:
  215. image: plugins/docker:17.05
  216. pull: true
  217. secrets: [ docker_username, docker_password ]
  218. repo: gitea/gitea
  219. tags: [ 'latest' ]
  220. when:
  221. event: [ push ]
  222. branch: [ master ]
  223. release:
  224. image: plugins/s3:1
  225. pull: true
  226. secrets: [ aws_access_key_id, aws_secret_access_key ]
  227. bucket: releases
  228. endpoint: https://storage.gitea.io
  229. path_style: true
  230. strip_prefix: dist/release/
  231. source: dist/release/*
  232. target: /gitea/${DRONE_TAG##v}
  233. when:
  234. event: [ tag ]
  235. release:
  236. image: plugins/s3:1
  237. pull: true
  238. secrets: [ aws_access_key_id, aws_secret_access_key ]
  239. bucket: releases
  240. endpoint: https://storage.gitea.io
  241. path_style: true
  242. strip_prefix: dist/release/
  243. source: dist/release/*
  244. target: /gitea/${DRONE_BRANCH##release/v}
  245. when:
  246. event: [ push ]
  247. branch: [ release/* ]
  248. release:
  249. image: plugins/s3:1
  250. pull: true
  251. secrets: [ aws_access_key_id, aws_secret_access_key ]
  252. bucket: releases
  253. endpoint: https://storage.gitea.io
  254. path_style: true
  255. strip_prefix: dist/release/
  256. source: dist/release/*
  257. target: /gitea/master
  258. when:
  259. event: [ push ]
  260. branch: [ master ]
  261. github:
  262. image: plugins/github-release:1
  263. pull: true
  264. secrets: [ github_token ]
  265. files:
  266. - dist/release/*
  267. when:
  268. event: [ tag ]
  269. upload_translations:
  270. image: jonasfranz/crowdin
  271. pull: true
  272. secrets: [ crowdin_key ]
  273. project_identifier: gitea
  274. ignore_branch: true
  275. download: false
  276. files:
  277. locale_en-US.ini: options/locale/locale_en-US.ini
  278. when:
  279. event: [ push ]
  280. branch: [ master ]
  281. discord:
  282. image: appleboy/drone-discord:1.0.0
  283. pull: true
  284. secrets: [ discord_webhook_id, discord_webhook_token ]
  285. when:
  286. event: [ push, tag, pull_request ]
  287. status: [ changed, failure ]
  288. services:
  289. mysql:
  290. image: mysql:5.7
  291. environment:
  292. - MYSQL_DATABASE=test
  293. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  294. when:
  295. event: [ push, tag, pull_request ]
  296. pgsql:
  297. image: postgres:9.5
  298. environment:
  299. - POSTGRES_DB=test
  300. when:
  301. event: [ push, tag, pull_request ]