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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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, 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: [ '${TAG}' ]
  65. when:
  66. event: [ tag ]
  67. branch: [ refs/tags/* ]
  68. docker:
  69. image: plugins/docker
  70. repo: gitea/gitea
  71. tags: [ 'latest' ]
  72. when:
  73. event: [ push ]
  74. branch: [ master ]
  75. release:
  76. image: plugins/s3
  77. path_style: true
  78. strip_prefix: dist/release/
  79. source: dist/release/*
  80. target: /gitea/master
  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/$$TAG
  90. when:
  91. event: [ tag ]
  92. branch: [ refs/tags/* ]
  93. github:
  94. image: plugins/github-release
  95. files:
  96. - dist/release/*
  97. when:
  98. event: [ tag ]
  99. branch: [ refs/tags/* ]
  100. gitter:
  101. image: plugins/gitter
  102. services:
  103. mysql:
  104. image: mysql:5.7
  105. environment:
  106. - MYSQL_DATABASE=test
  107. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  108. when:
  109. event: [ push ]
  110. pgsql:
  111. image: postgres:9.5
  112. environment:
  113. - POSTGRES_DB=test
  114. when:
  115. event: [ push ]