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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: release-latest
  5. platform:
  6. os: linux
  7. arch: amd64
  8. workspace:
  9. base: /source
  10. path: /
  11. trigger:
  12. branch:
  13. - main
  14. - "release/*"
  15. event:
  16. - push
  17. paths:
  18. exclude:
  19. - "docs/**"
  20. volumes:
  21. - name: deps
  22. temp: {}
  23. steps:
  24. - name: fetch-tags
  25. image: docker:git
  26. pull: always
  27. commands:
  28. - git fetch --tags --force
  29. - name: deps-frontend
  30. image: node:20
  31. pull: always
  32. commands:
  33. - make deps-frontend
  34. - name: deps-backend
  35. image: gitea/test_env:linux-1.20-amd64
  36. pull: always
  37. commands:
  38. - make deps-backend
  39. volumes:
  40. - name: deps
  41. path: /go
  42. - name: static
  43. image: techknowlogick/xgo:go-1.20.x
  44. pull: always
  45. commands:
  46. # Upgrade to node 20 once https://github.com/techknowlogick/xgo/issues/163 is resolved
  47. - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
  48. - export PATH=$PATH:$GOPATH/bin
  49. - make release
  50. environment:
  51. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  52. TAGS: bindata sqlite sqlite_unlock_notify
  53. DEBIAN_FRONTEND: noninteractive
  54. volumes:
  55. - name: deps
  56. path: /go
  57. - name: gpg-sign
  58. image: plugins/gpgsign:1
  59. pull: always
  60. settings:
  61. detach_sign: true
  62. excludes:
  63. - "dist/release/*.sha256"
  64. files:
  65. - "dist/release/*"
  66. environment:
  67. GPGSIGN_KEY:
  68. from_secret: gpgsign_key
  69. GPGSIGN_PASSPHRASE:
  70. from_secret: gpgsign_passphrase
  71. - name: release-branch
  72. image: woodpeckerci/plugin-s3:latest
  73. pull: always
  74. settings:
  75. acl:
  76. from_secret: aws_s3_acl
  77. region:
  78. from_secret: aws_s3_region
  79. bucket:
  80. from_secret: aws_s3_bucket
  81. endpoint:
  82. from_secret: aws_s3_endpoint
  83. path_style:
  84. from_secret: aws_s3_path_style
  85. source: "dist/release/*"
  86. strip_prefix: dist/release/
  87. target: "/gitea/${DRONE_BRANCH##release/v}"
  88. environment:
  89. AWS_ACCESS_KEY_ID:
  90. from_secret: aws_access_key_id
  91. AWS_SECRET_ACCESS_KEY:
  92. from_secret: aws_secret_access_key
  93. when:
  94. branch:
  95. - "release/*"
  96. event:
  97. - push
  98. - name: release-main
  99. image: woodpeckerci/plugin-s3:latest
  100. settings:
  101. acl:
  102. from_secret: aws_s3_acl
  103. region:
  104. from_secret: aws_s3_region
  105. bucket:
  106. from_secret: aws_s3_bucket
  107. endpoint:
  108. from_secret: aws_s3_endpoint
  109. path_style:
  110. from_secret: aws_s3_path_style
  111. source: "dist/release/*"
  112. strip_prefix: dist/release/
  113. target: /gitea/main
  114. environment:
  115. AWS_ACCESS_KEY_ID:
  116. from_secret: aws_access_key_id
  117. AWS_SECRET_ACCESS_KEY:
  118. from_secret: aws_secret_access_key
  119. when:
  120. branch:
  121. - main
  122. event:
  123. - push
  124. ---
  125. kind: pipeline
  126. name: release-version
  127. platform:
  128. os: linux
  129. arch: amd64
  130. workspace:
  131. base: /source
  132. path: /
  133. trigger:
  134. event:
  135. - tag
  136. volumes:
  137. - name: deps
  138. temp: {}
  139. steps:
  140. - name: fetch-tags
  141. image: docker:git
  142. pull: always
  143. commands:
  144. - git fetch --tags --force
  145. - name: deps-frontend
  146. image: node:20
  147. pull: always
  148. commands:
  149. - make deps-frontend
  150. - name: deps-backend
  151. image: gitea/test_env:linux-1.20-amd64
  152. pull: always
  153. commands:
  154. - make deps-backend
  155. volumes:
  156. - name: deps
  157. path: /go
  158. - name: static
  159. image: techknowlogick/xgo:go-1.20.x
  160. pull: always
  161. commands:
  162. # Upgrade to node 20 once https://github.com/techknowlogick/xgo/issues/163 is resolved
  163. - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
  164. - export PATH=$PATH:$GOPATH/bin
  165. - make release
  166. environment:
  167. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  168. TAGS: bindata sqlite sqlite_unlock_notify
  169. DEBIAN_FRONTEND: noninteractive
  170. depends_on: [fetch-tags]
  171. volumes:
  172. - name: deps
  173. path: /go
  174. - name: gpg-sign
  175. image: plugins/gpgsign:1
  176. pull: always
  177. settings:
  178. detach_sign: true
  179. excludes:
  180. - "dist/release/*.sha256"
  181. files:
  182. - "dist/release/*"
  183. environment:
  184. GPGSIGN_KEY:
  185. from_secret: gpgsign_key
  186. GPGSIGN_PASSPHRASE:
  187. from_secret: gpgsign_passphrase
  188. depends_on: [static]
  189. - name: release-tag
  190. image: woodpeckerci/plugin-s3:latest
  191. pull: always
  192. settings:
  193. acl:
  194. from_secret: aws_s3_acl
  195. region:
  196. from_secret: aws_s3_region
  197. bucket:
  198. from_secret: aws_s3_bucket
  199. endpoint:
  200. from_secret: aws_s3_endpoint
  201. path_style:
  202. from_secret: aws_s3_path_style
  203. source: "dist/release/*"
  204. strip_prefix: dist/release/
  205. target: "/gitea/${DRONE_TAG##v}"
  206. environment:
  207. AWS_ACCESS_KEY_ID:
  208. from_secret: aws_access_key_id
  209. AWS_SECRET_ACCESS_KEY:
  210. from_secret: aws_secret_access_key
  211. depends_on: [gpg-sign]
  212. - name: github
  213. image: plugins/github-release:latest
  214. pull: always
  215. settings:
  216. files:
  217. - "dist/release/*"
  218. file_exists: overwrite
  219. environment:
  220. GITHUB_TOKEN:
  221. from_secret: github_token
  222. depends_on: [gpg-sign]
  223. ---
  224. kind: pipeline
  225. type: docker
  226. name: docker-linux-amd64-release-version
  227. platform:
  228. os: linux
  229. arch: amd64
  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-amd64
  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-amd64-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-amd64-release-candidate-version
  291. platform:
  292. os: linux
  293. arch: amd64
  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-amd64
  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-amd64-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-linux-amd64-release
  350. platform:
  351. os: linux
  352. arch: amd64
  353. trigger:
  354. ref:
  355. - refs/heads/main
  356. steps:
  357. - name: fetch-tags
  358. image: docker:git
  359. pull: always
  360. commands:
  361. - git fetch --tags --force
  362. - name: publish
  363. image: plugins/docker:latest
  364. pull: always
  365. settings:
  366. auto_tag: false
  367. tags: nightly-linux-amd64
  368. repo: gitea/gitea
  369. build_args:
  370. - GOPROXY=https://goproxy.io
  371. password:
  372. from_secret: docker_password
  373. username:
  374. from_secret: docker_username
  375. environment:
  376. PLUGIN_MIRROR:
  377. from_secret: plugin_mirror
  378. DOCKER_BUILDKIT: 1
  379. when:
  380. event:
  381. exclude:
  382. - pull_request
  383. - name: publish-rootless
  384. image: plugins/docker:latest
  385. settings:
  386. dockerfile: Dockerfile.rootless
  387. auto_tag: false
  388. tags: nightly-linux-amd64-rootless
  389. repo: gitea/gitea
  390. build_args:
  391. - GOPROXY=https://goproxy.io
  392. password:
  393. from_secret: docker_password
  394. username:
  395. from_secret: docker_username
  396. environment:
  397. PLUGIN_MIRROR:
  398. from_secret: plugin_mirror
  399. DOCKER_BUILDKIT: 1
  400. when:
  401. event:
  402. exclude:
  403. - pull_request
  404. ---
  405. kind: pipeline
  406. name: docker-linux-amd64-release-branch
  407. platform:
  408. os: linux
  409. arch: amd64
  410. trigger:
  411. ref:
  412. - "refs/heads/release/v*"
  413. steps:
  414. - name: fetch-tags
  415. image: docker:git
  416. pull: always
  417. commands:
  418. - git fetch --tags --force
  419. - name: publish
  420. image: plugins/docker:latest
  421. pull: always
  422. settings:
  423. auto_tag: false
  424. tags: ${DRONE_BRANCH##release/v}-nightly-linux-amd64
  425. repo: gitea/gitea
  426. build_args:
  427. - GOPROXY=https://goproxy.io
  428. password:
  429. from_secret: docker_password
  430. username:
  431. from_secret: docker_username
  432. environment:
  433. PLUGIN_MIRROR:
  434. from_secret: plugin_mirror
  435. DOCKER_BUILDKIT: 1
  436. when:
  437. event:
  438. exclude:
  439. - pull_request
  440. - name: publish-rootless
  441. image: plugins/docker:latest
  442. settings:
  443. dockerfile: Dockerfile.rootless
  444. auto_tag: false
  445. tags: ${DRONE_BRANCH##release/v}-nightly-linux-amd64-rootless
  446. repo: gitea/gitea
  447. build_args:
  448. - GOPROXY=https://goproxy.io
  449. password:
  450. from_secret: docker_password
  451. username:
  452. from_secret: docker_username
  453. environment:
  454. PLUGIN_MIRROR:
  455. from_secret: plugin_mirror
  456. DOCKER_BUILDKIT: 1
  457. when:
  458. event:
  459. exclude:
  460. - pull_request
  461. ---
  462. kind: pipeline
  463. type: docker
  464. name: docker-linux-arm64-release-version
  465. platform:
  466. os: linux
  467. arch: arm64
  468. trigger:
  469. ref:
  470. include:
  471. - "refs/tags/**"
  472. exclude:
  473. - "refs/tags/**-rc*"
  474. paths:
  475. exclude:
  476. - "docs/**"
  477. steps:
  478. - name: fetch-tags
  479. image: docker:git
  480. pull: always
  481. commands:
  482. - git fetch --tags --force
  483. - name: publish
  484. image: plugins/docker:latest
  485. pull: always
  486. settings:
  487. auto_tag: true
  488. auto_tag_suffix: linux-arm64
  489. repo: gitea/gitea
  490. build_args:
  491. - GOPROXY=https://goproxy.io
  492. password:
  493. from_secret: docker_password
  494. username:
  495. from_secret: docker_username
  496. environment:
  497. PLUGIN_MIRROR:
  498. from_secret: plugin_mirror
  499. DOCKER_BUILDKIT: 1
  500. when:
  501. event:
  502. exclude:
  503. - pull_request
  504. - name: publish-rootless
  505. image: plugins/docker:latest
  506. settings:
  507. dockerfile: Dockerfile.rootless
  508. auto_tag: true
  509. auto_tag_suffix: linux-arm64-rootless
  510. repo: gitea/gitea
  511. build_args:
  512. - GOPROXY=https://goproxy.io
  513. password:
  514. from_secret: docker_password
  515. username:
  516. from_secret: docker_username
  517. environment:
  518. PLUGIN_MIRROR:
  519. from_secret: plugin_mirror
  520. DOCKER_BUILDKIT: 1
  521. when:
  522. event:
  523. exclude:
  524. - pull_request
  525. ---
  526. kind: pipeline
  527. type: docker
  528. name: docker-linux-arm64-release-candidate-version
  529. platform:
  530. os: linux
  531. arch: arm64
  532. trigger:
  533. ref:
  534. - "refs/tags/**-rc*"
  535. paths:
  536. exclude:
  537. - "docs/**"
  538. steps:
  539. - name: fetch-tags
  540. image: docker:git
  541. pull: always
  542. commands:
  543. - git fetch --tags --force
  544. - name: publish
  545. image: plugins/docker:latest
  546. pull: always
  547. settings:
  548. tags: ${DRONE_TAG##v}-linux-arm64
  549. repo: gitea/gitea
  550. build_args:
  551. - GOPROXY=https://goproxy.io
  552. password:
  553. from_secret: docker_password
  554. username:
  555. from_secret: docker_username
  556. environment:
  557. PLUGIN_MIRROR:
  558. from_secret: plugin_mirror
  559. DOCKER_BUILDKIT: 1
  560. when:
  561. event:
  562. exclude:
  563. - pull_request
  564. - name: publish-rootless
  565. image: plugins/docker:latest
  566. settings:
  567. dockerfile: Dockerfile.rootless
  568. tags: ${DRONE_TAG##v}-linux-arm64-rootless
  569. repo: gitea/gitea
  570. build_args:
  571. - GOPROXY=https://goproxy.io
  572. password:
  573. from_secret: docker_password
  574. username:
  575. from_secret: docker_username
  576. environment:
  577. PLUGIN_MIRROR:
  578. from_secret: plugin_mirror
  579. DOCKER_BUILDKIT: 1
  580. when:
  581. event:
  582. exclude:
  583. - pull_request
  584. ---
  585. kind: pipeline
  586. type: docker
  587. name: docker-linux-arm64-release
  588. platform:
  589. os: linux
  590. arch: arm64
  591. trigger:
  592. ref:
  593. - refs/heads/main
  594. paths:
  595. exclude:
  596. - "docs/**"
  597. steps:
  598. - name: fetch-tags
  599. image: docker:git
  600. pull: always
  601. commands:
  602. - git fetch --tags --force
  603. - name: publish
  604. image: plugins/docker:latest
  605. pull: always
  606. settings:
  607. auto_tag: false
  608. tags: nightly-linux-arm64
  609. repo: gitea/gitea
  610. build_args:
  611. - GOPROXY=https://goproxy.io
  612. password:
  613. from_secret: docker_password
  614. username:
  615. from_secret: docker_username
  616. environment:
  617. PLUGIN_MIRROR:
  618. from_secret: plugin_mirror
  619. DOCKER_BUILDKIT: 1
  620. when:
  621. event:
  622. exclude:
  623. - pull_request
  624. - name: publish-rootless
  625. image: plugins/docker:latest
  626. settings:
  627. dockerfile: Dockerfile.rootless
  628. auto_tag: false
  629. tags: nightly-linux-arm64-rootless
  630. repo: gitea/gitea
  631. build_args:
  632. - GOPROXY=https://goproxy.io
  633. password:
  634. from_secret: docker_password
  635. username:
  636. from_secret: docker_username
  637. environment:
  638. PLUGIN_MIRROR:
  639. from_secret: plugin_mirror
  640. DOCKER_BUILDKIT: 1
  641. when:
  642. event:
  643. exclude:
  644. - pull_request
  645. ---
  646. kind: pipeline
  647. name: docker-linux-arm64-release-branch
  648. platform:
  649. os: linux
  650. arch: arm64
  651. trigger:
  652. ref:
  653. - "refs/heads/release/v*"
  654. steps:
  655. - name: fetch-tags
  656. image: docker:git
  657. pull: always
  658. commands:
  659. - git fetch --tags --force
  660. - name: publish
  661. image: plugins/docker:latest
  662. pull: always
  663. settings:
  664. auto_tag: false
  665. tags: ${DRONE_BRANCH##release/v}-nightly-linux-arm64
  666. repo: gitea/gitea
  667. build_args:
  668. - GOPROXY=https://goproxy.io
  669. password:
  670. from_secret: docker_password
  671. username:
  672. from_secret: docker_username
  673. environment:
  674. PLUGIN_MIRROR:
  675. from_secret: plugin_mirror
  676. DOCKER_BUILDKIT: 1
  677. when:
  678. event:
  679. exclude:
  680. - pull_request
  681. - name: publish-rootless
  682. image: plugins/docker:latest
  683. settings:
  684. dockerfile: Dockerfile.rootless
  685. auto_tag: false
  686. tags: ${DRONE_BRANCH##release/v}-nightly-linux-arm64-rootless
  687. repo: gitea/gitea
  688. build_args:
  689. - GOPROXY=https://goproxy.io
  690. password:
  691. from_secret: docker_password
  692. username:
  693. from_secret: docker_username
  694. environment:
  695. PLUGIN_MIRROR:
  696. from_secret: plugin_mirror
  697. DOCKER_BUILDKIT: 1
  698. when:
  699. event:
  700. exclude:
  701. - pull_request
  702. ---
  703. kind: pipeline
  704. type: docker
  705. name: docker-manifest-version
  706. platform:
  707. os: linux
  708. arch: amd64
  709. steps:
  710. - name: manifest-rootless
  711. image: plugins/manifest
  712. pull: always
  713. settings:
  714. auto_tag: true
  715. ignore_missing: true
  716. spec: docker/manifest.rootless.tmpl
  717. password:
  718. from_secret: docker_password
  719. username:
  720. from_secret: docker_username
  721. - name: manifest
  722. image: plugins/manifest
  723. settings:
  724. auto_tag: true
  725. ignore_missing: true
  726. spec: docker/manifest.tmpl
  727. password:
  728. from_secret: docker_password
  729. username:
  730. from_secret: docker_username
  731. trigger:
  732. ref:
  733. - "refs/tags/**"
  734. paths:
  735. exclude:
  736. - "docs/**"
  737. depends_on:
  738. - docker-linux-amd64-release-version
  739. - docker-linux-amd64-release-candidate-version
  740. - docker-linux-arm64-release-version
  741. - docker-linux-arm64-release-candidate-version
  742. ---
  743. kind: pipeline
  744. type: docker
  745. name: docker-manifest
  746. platform:
  747. os: linux
  748. arch: amd64
  749. steps:
  750. - name: manifest-rootless
  751. image: plugins/manifest
  752. pull: always
  753. settings:
  754. auto_tag: false
  755. ignore_missing: true
  756. spec: docker/manifest.rootless.tmpl
  757. password:
  758. from_secret: docker_password
  759. username:
  760. from_secret: docker_username
  761. - name: manifest
  762. image: plugins/manifest
  763. settings:
  764. auto_tag: false
  765. ignore_missing: true
  766. spec: docker/manifest.tmpl
  767. password:
  768. from_secret: docker_password
  769. username:
  770. from_secret: docker_username
  771. trigger:
  772. ref:
  773. - refs/heads/main
  774. - "refs/heads/release/v*"
  775. paths:
  776. exclude:
  777. - "docs/**"
  778. depends_on:
  779. - docker-linux-amd64-release
  780. - docker-linux-arm64-release
  781. - docker-linux-amd64-release-branch
  782. - docker-linux-arm64-release-branch