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 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. ---
  2. kind: pipeline
  3. name: release-version
  4. platform:
  5. os: linux
  6. arch: amd64
  7. workspace:
  8. base: /source
  9. path: /
  10. trigger:
  11. event:
  12. - tag
  13. volumes:
  14. - name: deps
  15. temp: {}
  16. steps:
  17. - name: fetch-tags
  18. image: docker:git
  19. pull: always
  20. commands:
  21. - git fetch --tags --force
  22. - name: deps-frontend
  23. image: node:20
  24. pull: always
  25. commands:
  26. - make deps-frontend
  27. - name: deps-backend
  28. image: gitea/test_env:linux-1.20-amd64
  29. pull: always
  30. commands:
  31. - make deps-backend
  32. volumes:
  33. - name: deps
  34. path: /go
  35. - name: static
  36. image: techknowlogick/xgo:go-1.21.x
  37. pull: always
  38. commands:
  39. - curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get -qqy install nodejs
  40. - export PATH=$PATH:$GOPATH/bin
  41. - make release
  42. environment:
  43. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  44. TAGS: bindata sqlite sqlite_unlock_notify
  45. DEBIAN_FRONTEND: noninteractive
  46. depends_on: [fetch-tags]
  47. volumes:
  48. - name: deps
  49. path: /go
  50. - name: gpg-sign
  51. image: plugins/gpgsign:1
  52. pull: always
  53. settings:
  54. detach_sign: true
  55. excludes:
  56. - "dist/release/*.sha256"
  57. files:
  58. - "dist/release/*"
  59. environment:
  60. GPGSIGN_KEY:
  61. from_secret: gpgsign_key
  62. GPGSIGN_PASSPHRASE:
  63. from_secret: gpgsign_passphrase
  64. depends_on: [static]
  65. - name: release-tag
  66. image: woodpeckerci/plugin-s3:latest
  67. pull: always
  68. settings:
  69. acl:
  70. from_secret: aws_s3_acl
  71. region:
  72. from_secret: aws_s3_region
  73. bucket:
  74. from_secret: aws_s3_bucket
  75. endpoint:
  76. from_secret: aws_s3_endpoint
  77. path_style:
  78. from_secret: aws_s3_path_style
  79. source: "dist/release/*"
  80. strip_prefix: dist/release/
  81. target: "/gitea/${DRONE_TAG##v}"
  82. environment:
  83. AWS_ACCESS_KEY_ID:
  84. from_secret: aws_access_key_id
  85. AWS_SECRET_ACCESS_KEY:
  86. from_secret: aws_secret_access_key
  87. depends_on: [gpg-sign]
  88. - name: github
  89. image: plugins/github-release:latest
  90. pull: always
  91. settings:
  92. files:
  93. - "dist/release/*"
  94. file_exists: overwrite
  95. environment:
  96. GITHUB_TOKEN:
  97. from_secret: github_token
  98. depends_on: [gpg-sign]
  99. ---
  100. kind: pipeline
  101. type: docker
  102. name: docker-linux-amd64-release-version
  103. platform:
  104. os: linux
  105. arch: amd64
  106. trigger:
  107. ref:
  108. include:
  109. - "refs/tags/**"
  110. exclude:
  111. - "refs/tags/**-rc*"
  112. paths:
  113. exclude:
  114. - "docs/**"
  115. steps:
  116. - name: fetch-tags
  117. image: docker:git
  118. pull: always
  119. commands:
  120. - git fetch --tags --force
  121. - name: publish
  122. image: plugins/docker:latest
  123. pull: always
  124. settings:
  125. auto_tag: true
  126. auto_tag_suffix: linux-amd64
  127. repo: gitea/gitea
  128. build_args:
  129. - GOPROXY=https://goproxy.io
  130. password:
  131. from_secret: docker_password
  132. username:
  133. from_secret: docker_username
  134. environment:
  135. PLUGIN_MIRROR:
  136. from_secret: plugin_mirror
  137. DOCKER_BUILDKIT: 1
  138. when:
  139. event:
  140. exclude:
  141. - pull_request
  142. - name: publish-rootless
  143. image: plugins/docker:latest
  144. settings:
  145. dockerfile: Dockerfile.rootless
  146. auto_tag: true
  147. auto_tag_suffix: linux-amd64-rootless
  148. repo: gitea/gitea
  149. build_args:
  150. - GOPROXY=https://goproxy.io
  151. password:
  152. from_secret: docker_password
  153. username:
  154. from_secret: docker_username
  155. environment:
  156. PLUGIN_MIRROR:
  157. from_secret: plugin_mirror
  158. DOCKER_BUILDKIT: 1
  159. when:
  160. event:
  161. exclude:
  162. - pull_request
  163. ---
  164. kind: pipeline
  165. type: docker
  166. name: docker-linux-amd64-release-candidate-version
  167. platform:
  168. os: linux
  169. arch: amd64
  170. trigger:
  171. ref:
  172. - "refs/tags/**-rc*"
  173. paths:
  174. exclude:
  175. - "docs/**"
  176. steps:
  177. - name: fetch-tags
  178. image: docker:git
  179. pull: always
  180. commands:
  181. - git fetch --tags --force
  182. - name: publish
  183. image: plugins/docker:latest
  184. pull: always
  185. settings:
  186. tags: ${DRONE_TAG##v}-linux-amd64
  187. repo: gitea/gitea
  188. build_args:
  189. - GOPROXY=https://goproxy.io
  190. password:
  191. from_secret: docker_password
  192. username:
  193. from_secret: docker_username
  194. environment:
  195. PLUGIN_MIRROR:
  196. from_secret: plugin_mirror
  197. DOCKER_BUILDKIT: 1
  198. when:
  199. event:
  200. exclude:
  201. - pull_request
  202. - name: publish-rootless
  203. image: plugins/docker:latest
  204. settings:
  205. dockerfile: Dockerfile.rootless
  206. tags: ${DRONE_TAG##v}-linux-amd64-rootless
  207. repo: gitea/gitea
  208. build_args:
  209. - GOPROXY=https://goproxy.io
  210. password:
  211. from_secret: docker_password
  212. username:
  213. from_secret: docker_username
  214. environment:
  215. PLUGIN_MIRROR:
  216. from_secret: plugin_mirror
  217. DOCKER_BUILDKIT: 1
  218. when:
  219. event:
  220. exclude:
  221. - pull_request
  222. ---
  223. kind: pipeline
  224. type: docker
  225. name: docker-linux-arm64-release-version
  226. platform:
  227. os: linux
  228. arch: arm64
  229. trigger:
  230. ref:
  231. include:
  232. - "refs/tags/**"
  233. exclude:
  234. - "refs/tags/**-rc*"
  235. paths:
  236. exclude:
  237. - "docs/**"
  238. steps:
  239. - name: fetch-tags
  240. image: docker:git
  241. pull: always
  242. commands:
  243. - git fetch --tags --force
  244. - name: publish
  245. image: plugins/docker:latest
  246. pull: always
  247. settings:
  248. auto_tag: true
  249. auto_tag_suffix: linux-arm64
  250. repo: gitea/gitea
  251. build_args:
  252. - GOPROXY=https://goproxy.io
  253. password:
  254. from_secret: docker_password
  255. username:
  256. from_secret: docker_username
  257. environment:
  258. PLUGIN_MIRROR:
  259. from_secret: plugin_mirror
  260. DOCKER_BUILDKIT: 1
  261. when:
  262. event:
  263. exclude:
  264. - pull_request
  265. - name: publish-rootless
  266. image: plugins/docker:latest
  267. settings:
  268. dockerfile: Dockerfile.rootless
  269. auto_tag: true
  270. auto_tag_suffix: linux-arm64-rootless
  271. repo: gitea/gitea
  272. build_args:
  273. - GOPROXY=https://goproxy.io
  274. password:
  275. from_secret: docker_password
  276. username:
  277. from_secret: docker_username
  278. environment:
  279. PLUGIN_MIRROR:
  280. from_secret: plugin_mirror
  281. DOCKER_BUILDKIT: 1
  282. when:
  283. event:
  284. exclude:
  285. - pull_request
  286. ---
  287. kind: pipeline
  288. type: docker
  289. name: docker-linux-arm64-release-candidate-version
  290. platform:
  291. os: linux
  292. arch: arm64
  293. trigger:
  294. ref:
  295. - "refs/tags/**-rc*"
  296. paths:
  297. exclude:
  298. - "docs/**"
  299. steps:
  300. - name: fetch-tags
  301. image: docker:git
  302. pull: always
  303. commands:
  304. - git fetch --tags --force
  305. - name: publish
  306. image: plugins/docker:latest
  307. pull: always
  308. settings:
  309. tags: ${DRONE_TAG##v}-linux-arm64
  310. repo: gitea/gitea
  311. build_args:
  312. - GOPROXY=https://goproxy.io
  313. password:
  314. from_secret: docker_password
  315. username:
  316. from_secret: docker_username
  317. environment:
  318. PLUGIN_MIRROR:
  319. from_secret: plugin_mirror
  320. DOCKER_BUILDKIT: 1
  321. when:
  322. event:
  323. exclude:
  324. - pull_request
  325. - name: publish-rootless
  326. image: plugins/docker:latest
  327. settings:
  328. dockerfile: Dockerfile.rootless
  329. tags: ${DRONE_TAG##v}-linux-arm64-rootless
  330. repo: gitea/gitea
  331. build_args:
  332. - GOPROXY=https://goproxy.io
  333. password:
  334. from_secret: docker_password
  335. username:
  336. from_secret: docker_username
  337. environment:
  338. PLUGIN_MIRROR:
  339. from_secret: plugin_mirror
  340. DOCKER_BUILDKIT: 1
  341. when:
  342. event:
  343. exclude:
  344. - pull_request
  345. ---
  346. kind: pipeline
  347. type: docker
  348. name: docker-manifest-version
  349. platform:
  350. os: linux
  351. arch: amd64
  352. steps:
  353. - name: manifest-rootless
  354. image: plugins/manifest
  355. pull: always
  356. settings:
  357. auto_tag: true
  358. ignore_missing: true
  359. spec: docker/manifest.rootless.tmpl
  360. password:
  361. from_secret: docker_password
  362. username:
  363. from_secret: docker_username
  364. - name: manifest
  365. image: plugins/manifest
  366. settings:
  367. auto_tag: true
  368. ignore_missing: true
  369. spec: docker/manifest.tmpl
  370. password:
  371. from_secret: docker_password
  372. username:
  373. from_secret: docker_username
  374. trigger:
  375. ref:
  376. - "refs/tags/**"
  377. paths:
  378. exclude:
  379. - "docs/**"
  380. depends_on:
  381. - docker-linux-amd64-release-version
  382. - docker-linux-amd64-release-candidate-version
  383. - docker-linux-arm64-release-version
  384. - docker-linux-arm64-release-candidate-version