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

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