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.

146 lines
2.7 KiB

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