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.

160 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. commands:
  70. - make test-coverage
  71. when:
  72. event: [ push, tag ]
  73. docker:
  74. image: plugins/docker
  75. repo: gitea/gitea
  76. tags: [ '${DRONE_TAG##v}' ]
  77. when:
  78. event: [ tag ]
  79. branch: [ refs/tags/* ]
  80. docker:
  81. image: plugins/docker
  82. repo: gitea/gitea
  83. tags: [ '${DRONE_BRANCH##release/v}' ]
  84. when:
  85. event: [ push ]
  86. branch: [ release/* ]
  87. docker:
  88. image: plugins/docker
  89. repo: gitea/gitea
  90. tags: [ 'latest' ]
  91. when:
  92. event: [ push ]
  93. branch: [ master ]
  94. release:
  95. image: plugins/s3
  96. path_style: true
  97. strip_prefix: dist/release/
  98. source: dist/release/*
  99. target: /gitea/${DRONE_TAG##v}
  100. when:
  101. event: [ tag ]
  102. branch: [ refs/tags/* ]
  103. release:
  104. image: plugins/s3
  105. path_style: true
  106. strip_prefix: dist/release/
  107. source: dist/release/*
  108. target: /gitea/${DRONE_BRANCH##release/v}
  109. when:
  110. event: [ push ]
  111. branch: [ release/* ]
  112. release:
  113. image: plugins/s3
  114. path_style: true
  115. strip_prefix: dist/release/
  116. source: dist/release/*
  117. target: /gitea/master
  118. when:
  119. event: [ push ]
  120. branch: [ master ]
  121. github:
  122. image: plugins/github-release
  123. files:
  124. - dist/release/*
  125. when:
  126. event: [ tag ]
  127. branch: [ refs/tags/* ]
  128. gitter:
  129. image: plugins/gitter
  130. services:
  131. mysql:
  132. image: mysql:5.7
  133. environment:
  134. - MYSQL_DATABASE=test
  135. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  136. when:
  137. event: [ push, tag, pull_request ]
  138. pgsql:
  139. image: postgres:9.5
  140. environment:
  141. - POSTGRES_DB=test
  142. when:
  143. event: [ push, tag, pull_request ]