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

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