You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

190 lines
3.7 KiB

  1. workspace:
  2. base: /srv/app
  3. path: src/code.gitea.io/gitea
  4. pipeline:
  5. clone:
  6. image: plugins/git
  7. depth: 50
  8. tags: true
  9. build:
  10. image: webhippie/golang:edge
  11. pull: true
  12. environment:
  13. TAGS: bindata sqlite
  14. GOPATH: /srv/app
  15. commands:
  16. - apk -U add openssh-client
  17. - make clean
  18. - make generate
  19. - make vet
  20. - make lint
  21. - make misspell-check
  22. - make test-vendor
  23. - make build
  24. when:
  25. event: [ push, tag, pull_request ]
  26. test:
  27. image: webhippie/golang:edge
  28. pull: true
  29. environment:
  30. TAGS: bindata sqlite
  31. GOPATH: /srv/app
  32. commands:
  33. - apk -U add openssh-client
  34. - make test
  35. when:
  36. event: [ tag, pull_request ]
  37. test-coverage:
  38. image: webhippie/golang:edge
  39. pull: true
  40. environment:
  41. TAGS: bindata sqlite
  42. GOPATH: /srv/app
  43. commands:
  44. - apk -U add openssh-client
  45. - go get github.com/wadey/gocovmerge
  46. - make test-coverage
  47. when:
  48. event: [ push ]
  49. branch: master
  50. test-sqlite:
  51. image: webhippie/golang:edge
  52. pull: true
  53. environment:
  54. TAGS: bindata
  55. GOPATH: /srv/app
  56. commands:
  57. - echo "Needs to be fixed" # make test-sqlite
  58. when:
  59. event: [ push, tag, pull_request ]
  60. test-mysql:
  61. image: webhippie/golang:edge
  62. pull: true
  63. environment:
  64. TAGS: bindata
  65. GOPATH: /srv/app
  66. commands:
  67. - make test-mysql
  68. when:
  69. event: [ push, tag, pull_request ]
  70. test-pgsql:
  71. image: webhippie/golang:edge
  72. pull: true
  73. environment:
  74. TAGS: bindata
  75. GOPATH: /srv/app
  76. commands:
  77. - make test-pgsql
  78. when:
  79. event: [ push, tag, pull_request ]
  80. static:
  81. image: karalabe/xgo-latest:latest
  82. pull: true
  83. environment:
  84. TAGS: bindata sqlite
  85. GOPATH: /srv/app
  86. commands:
  87. - make release
  88. when:
  89. event: [ push, tag ]
  90. coverage:
  91. image: plugins/coverage
  92. server: https://coverage.gitea.io
  93. when:
  94. event: [ push ]
  95. branch: master
  96. docker:
  97. image: plugins/docker
  98. repo: gitea/gitea
  99. tags: [ '${DRONE_TAG##v}' ]
  100. when:
  101. event: [ tag ]
  102. branch: [ refs/tags/* ]
  103. docker:
  104. image: plugins/docker
  105. repo: gitea/gitea
  106. tags: [ '${DRONE_BRANCH##release/v}' ]
  107. when:
  108. event: [ push ]
  109. branch: [ release/* ]
  110. docker:
  111. image: plugins/docker
  112. repo: gitea/gitea
  113. tags: [ 'latest' ]
  114. when:
  115. event: [ push ]
  116. branch: [ master ]
  117. release:
  118. image: plugins/s3
  119. path_style: true
  120. strip_prefix: dist/release/
  121. source: dist/release/*
  122. target: /gitea/${DRONE_TAG##v}
  123. when:
  124. event: [ tag ]
  125. branch: [ refs/tags/* ]
  126. release:
  127. image: plugins/s3
  128. path_style: true
  129. strip_prefix: dist/release/
  130. source: dist/release/*
  131. target: /gitea/${DRONE_BRANCH##release/v}
  132. when:
  133. event: [ push ]
  134. branch: [ release/* ]
  135. release:
  136. image: plugins/s3
  137. path_style: true
  138. strip_prefix: dist/release/
  139. source: dist/release/*
  140. target: /gitea/master
  141. when:
  142. event: [ push ]
  143. branch: [ master ]
  144. github:
  145. image: plugins/github-release
  146. files:
  147. - dist/release/*
  148. when:
  149. event: [ tag ]
  150. branch: [ refs/tags/* ]
  151. discord:
  152. image: appleboy/drone-discord:0.0.4
  153. webhook_id: ${WEBHOOK_ID}
  154. webhook_token: ${WEBHOOK_TOKEN}
  155. when:
  156. event: [ push, tag, pull_request ]
  157. status: [ changed, failure ]
  158. services:
  159. mysql:
  160. image: mysql:5.7
  161. environment:
  162. - MYSQL_DATABASE=test
  163. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  164. when:
  165. event: [ push, tag, pull_request ]
  166. pgsql:
  167. image: postgres:9.5
  168. environment:
  169. - POSTGRES_DB=test
  170. when:
  171. event: [ push, tag, pull_request ]