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.

158 lines
3.0 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. test:
  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 test-vendor
  22. - make test
  23. - make build
  24. when:
  25. event: [ push, tag, pull_request ]
  26. test-sqlite:
  27. image: webhippie/golang:edge
  28. pull: true
  29. environment:
  30. TAGS: bindata
  31. GOPATH: /srv/app
  32. commands:
  33. - make test-sqlite
  34. when:
  35. event: [ push, tag, pull_request ]
  36. test-mysql:
  37. image: webhippie/golang:edge
  38. pull: true
  39. environment:
  40. TAGS: bindata
  41. GOPATH: /srv/app
  42. commands:
  43. - make test-mysql
  44. when:
  45. event: [ push, tag, pull_request ]
  46. test-pgsql:
  47. image: webhippie/golang:edge
  48. pull: true
  49. environment:
  50. TAGS: bindata
  51. GOPATH: /srv/app
  52. commands:
  53. - make test-pgsql
  54. when:
  55. event: [ push, tag, pull_request ]
  56. static:
  57. image: karalabe/xgo-latest:latest
  58. pull: true
  59. environment:
  60. TAGS: bindata sqlite
  61. GOPATH: /srv/app
  62. commands:
  63. - make release
  64. when:
  65. event: [ push, tag, pull_request ]
  66. coverage:
  67. image: plugins/coverage
  68. server: https://coverage.gitea.io
  69. when:
  70. event: [ push, tag, pull_request ]
  71. docker:
  72. image: plugins/docker
  73. repo: gitea/gitea
  74. tags: [ '${DRONE_TAG##v}' ]
  75. when:
  76. event: [ tag ]
  77. branch: [ refs/tags/* ]
  78. docker:
  79. image: plugins/docker
  80. repo: gitea/gitea
  81. tags: [ '${DRONE_BRANCH##release/v}' ]
  82. when:
  83. event: [ push ]
  84. branch: [ release/* ]
  85. docker:
  86. image: plugins/docker
  87. repo: gitea/gitea
  88. tags: [ 'latest' ]
  89. when:
  90. event: [ push ]
  91. branch: [ master ]
  92. release:
  93. image: plugins/s3
  94. path_style: true
  95. strip_prefix: dist/release/
  96. source: dist/release/*
  97. target: /gitea/${DRONE_TAG##v}
  98. when:
  99. event: [ tag ]
  100. branch: [ refs/tags/* ]
  101. release:
  102. image: plugins/s3
  103. path_style: true
  104. strip_prefix: dist/release/
  105. source: dist/release/*
  106. target: /gitea/${DRONE_BRANCH##release/v}
  107. when:
  108. event: [ push ]
  109. branch: [ release/* ]
  110. release:
  111. image: plugins/s3
  112. path_style: true
  113. strip_prefix: dist/release/
  114. source: dist/release/*
  115. target: /gitea/master
  116. when:
  117. event: [ push ]
  118. branch: [ master ]
  119. github:
  120. image: plugins/github-release
  121. files:
  122. - dist/release/*
  123. when:
  124. event: [ tag ]
  125. branch: [ refs/tags/* ]
  126. gitter:
  127. image: plugins/gitter
  128. services:
  129. mysql:
  130. image: mysql:5.7
  131. environment:
  132. - MYSQL_DATABASE=test
  133. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  134. when:
  135. event: [ push, tag, pull_request ]
  136. pgsql:
  137. image: postgres:9.5
  138. environment:
  139. - POSTGRES_DB=test
  140. when:
  141. event: [ push, tag, pull_request ]