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.

145 lines
2.7 KiB

  1. workspace:
  2. base: /srv/app
  3. path: src/code.gitea.io/gitea
  4. pipeline:
  5. clone:
  6. image: plugins/git
  7. tags: true
  8. test:
  9. image: webhippie/golang:edge
  10. pull: true
  11. environment:
  12. TAGS: bindata sqlite
  13. GOPATH: /srv/app
  14. commands:
  15. - apk -U add openssh-client
  16. - make clean
  17. - make generate
  18. - make vet
  19. - make lint
  20. - make test
  21. - make build
  22. when:
  23. event: [ push, tag, pull_request ]
  24. test-mysql:
  25. image: webhippie/golang:edge
  26. pull: true
  27. environment:
  28. TAGS: bindata
  29. GOPATH: /srv/app
  30. commands:
  31. - make test-mysql
  32. when:
  33. event: [ push, tag, pull_request ]
  34. test-pgsql:
  35. image: webhippie/golang:edge
  36. pull: true
  37. environment:
  38. TAGS: bindata
  39. GOPATH: /srv/app
  40. commands:
  41. - make test-pgsql
  42. when:
  43. event: [ push, tag, pull_request ]
  44. static:
  45. image: karalabe/xgo-latest:latest
  46. pull: true
  47. environment:
  48. TAGS: bindata sqlite
  49. GOPATH: /srv/app
  50. commands:
  51. - make release
  52. when:
  53. event: [ push, tag, pull_request ]
  54. coverage:
  55. image: plugins/coverage
  56. server: https://coverage.gitea.io
  57. when:
  58. event: [ push, tag, pull_request ]
  59. docker:
  60. image: plugins/docker
  61. repo: gitea/gitea
  62. tags: [ '${DRONE_TAG##v}' ]
  63. when:
  64. event: [ tag ]
  65. branch: [ refs/tags/* ]
  66. docker:
  67. image: plugins/docker
  68. repo: gitea/gitea
  69. tags: [ '${DRONE_BRANCH##release/v}' ]
  70. when:
  71. event: [ push ]
  72. branch: [ release/* ]
  73. docker:
  74. image: plugins/docker
  75. repo: gitea/gitea
  76. tags: [ 'latest' ]
  77. when:
  78. event: [ push ]
  79. branch: [ master ]
  80. release:
  81. image: plugins/s3
  82. path_style: true
  83. strip_prefix: dist/release/
  84. source: dist/release/*
  85. target: /gitea/${DRONE_TAG##v}
  86. when:
  87. event: [ tag ]
  88. branch: [ refs/tags/* ]
  89. release:
  90. image: plugins/s3
  91. path_style: true
  92. strip_prefix: dist/release/
  93. source: dist/release/*
  94. target: /gitea/${DRONE_BRANCH##release/v}
  95. when:
  96. event: [ push ]
  97. branch: [ release/* ]
  98. release:
  99. image: plugins/s3
  100. path_style: true
  101. strip_prefix: dist/release/
  102. source: dist/release/*
  103. target: /gitea/master
  104. when:
  105. event: [ push ]
  106. branch: [ master ]
  107. github:
  108. image: plugins/github-release
  109. files:
  110. - dist/release/*
  111. when:
  112. event: [ tag ]
  113. branch: [ refs/tags/* ]
  114. gitter:
  115. image: plugins/gitter
  116. services:
  117. mysql:
  118. image: mysql:5.7
  119. environment:
  120. - MYSQL_DATABASE=test
  121. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  122. when:
  123. event: [ push, tag, pull_request ]
  124. pgsql:
  125. image: postgres:9.5
  126. environment:
  127. - POSTGRES_DB=test
  128. when:
  129. event: [ push, tag, pull_request ]