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.

.drone.yml 2.8KB

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