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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: compliance
  5. platform:
  6. os: linux
  7. arch: amd64
  8. trigger:
  9. event:
  10. - push
  11. - tag
  12. - pull_request
  13. volumes:
  14. - name: deps
  15. temp: {}
  16. steps:
  17. - name: deps-frontend
  18. image: node:16
  19. pull: always
  20. commands:
  21. - make deps-frontend
  22. - name: deps-backend
  23. image: golang:1.18
  24. pull: always
  25. commands:
  26. - make deps-backend
  27. volumes:
  28. - name: deps
  29. path: /go
  30. - name: lint-frontend
  31. image: node:16
  32. commands:
  33. - make lint-frontend
  34. depends_on: [deps-frontend]
  35. - name: lint-backend
  36. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  37. pull: always
  38. commands:
  39. - make lint-backend
  40. environment:
  41. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  42. GOSUMDB: sum.golang.org
  43. TAGS: bindata sqlite sqlite_unlock_notify
  44. depends_on: [deps-backend]
  45. volumes:
  46. - name: deps
  47. path: /go
  48. - name: lint-backend-windows
  49. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  50. commands:
  51. - make golangci-lint-windows vet
  52. environment:
  53. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  54. GOSUMDB: sum.golang.org
  55. TAGS: bindata sqlite sqlite_unlock_notify
  56. GOOS: windows
  57. GOARCH: amd64
  58. depends_on: [deps-backend]
  59. volumes:
  60. - name: deps
  61. path: /go
  62. - name: lint-backend-gogit
  63. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  64. commands:
  65. - make lint-backend
  66. environment:
  67. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  68. GOSUMDB: sum.golang.org
  69. TAGS: bindata gogit sqlite sqlite_unlock_notify
  70. depends_on: [deps-backend]
  71. volumes:
  72. - name: deps
  73. path: /go
  74. - name: checks-frontend
  75. image: node:16
  76. commands:
  77. - make checks-frontend
  78. depends_on: [deps-frontend]
  79. - name: checks-backend
  80. image: golang:1.18
  81. commands:
  82. - make checks-backend
  83. depends_on: [deps-backend]
  84. volumes:
  85. - name: deps
  86. path: /go
  87. - name: test-frontend
  88. image: node:16
  89. commands:
  90. - make test-frontend
  91. depends_on: [lint-frontend]
  92. - name: build-frontend
  93. image: node:16
  94. commands:
  95. - make frontend
  96. depends_on: [test-frontend]
  97. - name: build-backend-no-gcc
  98. image: golang:1.17 # this step is kept as the lowest version of golang that we support
  99. pull: always
  100. environment:
  101. GO111MODULE: on
  102. GOPROXY: https://goproxy.io
  103. commands:
  104. - go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
  105. depends_on: [deps-backend, checks-backend]
  106. volumes:
  107. - name: deps
  108. path: /go
  109. - name: build-backend-arm64
  110. image: golang:1.18
  111. environment:
  112. GO111MODULE: on
  113. GOPROXY: https://goproxy.io
  114. GOOS: linux
  115. GOARCH: arm64
  116. TAGS: bindata gogit
  117. commands:
  118. - make backend # test cross compile
  119. - rm ./gitea # clean
  120. depends_on: [deps-backend, checks-backend]
  121. volumes:
  122. - name: deps
  123. path: /go
  124. - name: build-backend-windows
  125. image: golang:1.18
  126. environment:
  127. GO111MODULE: on
  128. GOPROXY: https://goproxy.io
  129. GOOS: windows
  130. GOARCH: amd64
  131. TAGS: bindata gogit
  132. commands:
  133. - go build -o gitea_windows
  134. depends_on: [deps-backend, checks-backend]
  135. volumes:
  136. - name: deps
  137. path: /go
  138. - name: build-backend-386
  139. image: golang:1.18
  140. environment:
  141. GO111MODULE: on
  142. GOPROXY: https://goproxy.io
  143. GOOS: linux
  144. GOARCH: 386
  145. commands:
  146. - go build -o gitea_linux_386 # test if compatible with 32 bit
  147. depends_on: [deps-backend, checks-backend]
  148. volumes:
  149. - name: deps
  150. path: /go
  151. ---
  152. kind: pipeline
  153. type: docker
  154. name: testing-amd64
  155. platform:
  156. os: linux
  157. arch: amd64
  158. depends_on:
  159. - compliance
  160. trigger:
  161. event:
  162. - push
  163. - tag
  164. - pull_request
  165. volumes:
  166. - name: deps
  167. temp: {}
  168. services:
  169. - name: mysql
  170. image: mysql:5.7
  171. pull: always
  172. environment:
  173. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  174. MYSQL_DATABASE: test
  175. - name: mysql8
  176. image: mysql:8
  177. pull: always
  178. environment:
  179. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  180. MYSQL_DATABASE: testgitea
  181. - name: mssql
  182. image: mcr.microsoft.com/mssql/server:latest
  183. pull: always
  184. environment:
  185. ACCEPT_EULA: Y
  186. MSSQL_PID: Standard
  187. SA_PASSWORD: MwantsaSecurePassword1
  188. - name: ldap
  189. image: gitea/test-openldap:latest
  190. pull: always
  191. - name: elasticsearch
  192. image: elasticsearch:7.5.0
  193. pull: always
  194. environment:
  195. discovery.type: single-node
  196. - name: minio
  197. image: minio/minio:RELEASE.2021-03-12T00-00-47Z
  198. pull: always
  199. commands:
  200. - minio server /data
  201. environment:
  202. MINIO_ACCESS_KEY: 123456
  203. MINIO_SECRET_KEY: 12345678
  204. steps:
  205. - name: fetch-tags
  206. image: docker:git
  207. pull: always
  208. commands:
  209. - git fetch --tags --force
  210. when:
  211. event:
  212. exclude:
  213. - pull_request
  214. - name: deps-backend
  215. image: golang:1.18
  216. pull: always
  217. commands:
  218. - make deps-backend
  219. volumes:
  220. - name: deps
  221. path: /go
  222. - name: tag-pre-condition
  223. image: drone/git
  224. pull: always
  225. commands:
  226. - git update-ref refs/heads/tag_test ${DRONE_COMMIT_SHA}
  227. - name: prepare-test-env
  228. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  229. pull: always
  230. commands:
  231. - ./build/test-env-prepare.sh
  232. - name: build
  233. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  234. user: gitea
  235. commands:
  236. - ./build/test-env-check.sh
  237. - make backend
  238. environment:
  239. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  240. GOSUMDB: sum.golang.org
  241. TAGS: bindata sqlite sqlite_unlock_notify
  242. depends_on: [deps-backend, prepare-test-env]
  243. volumes:
  244. - name: deps
  245. path: /go
  246. - name: unit-test
  247. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  248. user: gitea
  249. commands:
  250. - make unit-test-coverage test-check
  251. environment:
  252. GOPROXY: https://goproxy.io
  253. TAGS: bindata sqlite sqlite_unlock_notify
  254. RACE_ENABLED: true
  255. GITHUB_READ_TOKEN:
  256. from_secret: github_read_token
  257. depends_on: [deps-backend, prepare-test-env]
  258. volumes:
  259. - name: deps
  260. path: /go
  261. - name: unit-test-gogit
  262. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  263. user: gitea
  264. commands:
  265. - make unit-test-coverage test-check
  266. environment:
  267. GOPROXY: https://goproxy.io
  268. TAGS: bindata gogit sqlite sqlite_unlock_notify
  269. RACE_ENABLED: true
  270. GITHUB_READ_TOKEN:
  271. from_secret: github_read_token
  272. depends_on: [deps-backend, prepare-test-env]
  273. volumes:
  274. - name: deps
  275. path: /go
  276. - name: test-mysql
  277. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  278. user: gitea
  279. commands:
  280. - make test-mysql-migration integration-test-coverage
  281. environment:
  282. GOPROXY: https://goproxy.io
  283. TAGS: bindata
  284. RACE_ENABLED: true
  285. TEST_LDAP: 1
  286. USE_REPO_TEST_DIR: 1
  287. TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200"
  288. depends_on: [build]
  289. volumes:
  290. - name: deps
  291. path: /go
  292. - name: test-mysql8
  293. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  294. user: gitea
  295. commands:
  296. - timeout -s ABRT 40m make test-mysql8-migration test-mysql8
  297. environment:
  298. GOPROXY: https://goproxy.io
  299. TAGS: bindata
  300. RACE_ENABLED: true
  301. TEST_LDAP: 1
  302. USE_REPO_TEST_DIR: 1
  303. depends_on: [build]
  304. volumes:
  305. - name: deps
  306. path: /go
  307. - name: test-mssql
  308. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  309. user: gitea
  310. commands:
  311. - make test-mssql-migration test-mssql
  312. environment:
  313. GOPROXY: https://goproxy.io
  314. TAGS: bindata
  315. RACE_ENABLED: true
  316. TEST_LDAP: 1
  317. USE_REPO_TEST_DIR: 1
  318. depends_on: [build]
  319. volumes:
  320. - name: deps
  321. path: /go
  322. - name: generate-coverage
  323. image: golang:1.18
  324. commands:
  325. - make coverage
  326. environment:
  327. GOPROXY: https://goproxy.io
  328. TAGS: bindata
  329. depends_on: [unit-test, test-mysql]
  330. when:
  331. branch:
  332. - main
  333. event:
  334. - push
  335. - pull_request
  336. - name: coverage-codecov
  337. image: woodpeckerci/plugin-codecov:next-alpine
  338. pull: always
  339. settings:
  340. files:
  341. - coverage.all
  342. token:
  343. from_secret: codecov_token
  344. depends_on: [generate-coverage]
  345. when:
  346. branch:
  347. - main
  348. event:
  349. - push
  350. - pull_request
  351. ---
  352. kind: pipeline
  353. name: testing-arm64
  354. platform:
  355. os: linux
  356. arch: arm64
  357. depends_on:
  358. - compliance
  359. trigger:
  360. event:
  361. - push
  362. - tag
  363. - pull_request
  364. volumes:
  365. - name: deps
  366. temp: {}
  367. services:
  368. - name: pgsql
  369. pull: default
  370. image: postgres:10
  371. environment:
  372. POSTGRES_DB: test
  373. POSTGRES_PASSWORD: postgres
  374. - name: ldap
  375. pull: default
  376. image: gitea/test-openldap:latest
  377. steps:
  378. - name: fetch-tags
  379. image: docker:git
  380. pull: always
  381. commands:
  382. - git fetch --tags --force
  383. when:
  384. event:
  385. exclude:
  386. - pull_request
  387. - name: deps-backend
  388. image: golang:1.18
  389. pull: always
  390. commands:
  391. - make deps-backend
  392. volumes:
  393. - name: deps
  394. path: /go
  395. - name: prepare-test-env
  396. image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
  397. pull: always
  398. commands:
  399. - ./build/test-env-prepare.sh
  400. - name: build
  401. image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
  402. user: gitea
  403. commands:
  404. - ./build/test-env-check.sh
  405. - make backend
  406. environment:
  407. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  408. GOSUMDB: sum.golang.org
  409. TAGS: bindata gogit sqlite sqlite_unlock_notify
  410. depends_on: [deps-backend, prepare-test-env]
  411. volumes:
  412. - name: deps
  413. path: /go
  414. - name: test-sqlite
  415. image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
  416. user: gitea
  417. commands:
  418. - timeout -s ABRT 40m make test-sqlite-migration test-sqlite
  419. environment:
  420. GOPROXY: https://goproxy.io
  421. TAGS: bindata gogit sqlite sqlite_unlock_notify
  422. RACE_ENABLED: true
  423. TEST_TAGS: gogit sqlite sqlite_unlock_notify
  424. USE_REPO_TEST_DIR: 1
  425. depends_on: [build]
  426. volumes:
  427. - name: deps
  428. path: /go
  429. - name: test-pgsql
  430. image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
  431. user: gitea
  432. commands:
  433. - timeout -s ABRT 40m make test-pgsql-migration test-pgsql
  434. environment:
  435. GOPROXY: https://goproxy.io
  436. TAGS: bindata gogit
  437. RACE_ENABLED: true
  438. TEST_TAGS: gogit
  439. TEST_LDAP: 1
  440. USE_REPO_TEST_DIR: 1
  441. depends_on: [build]
  442. volumes:
  443. - name: deps
  444. path: /go
  445. ---
  446. kind: pipeline
  447. name: update_translations
  448. platform:
  449. os: linux
  450. arch: arm64
  451. trigger:
  452. branch:
  453. - main
  454. event:
  455. - cron
  456. cron:
  457. - update_translations
  458. steps:
  459. - name: download
  460. image: jonasfranz/crowdin
  461. pull: always
  462. settings:
  463. download: true
  464. export_dir: options/locale/
  465. ignore_branch: true
  466. project_identifier: gitea
  467. environment:
  468. CROWDIN_KEY:
  469. from_secret: crowdin_key
  470. - name: update
  471. image: alpine:3.13
  472. pull: always
  473. commands:
  474. - ./build/update-locales.sh
  475. - name: push
  476. image: appleboy/drone-git-push
  477. pull: always
  478. settings:
  479. author_email: "teabot@gitea.io"
  480. author_name: GiteaBot
  481. branch: main
  482. commit: true
  483. commit_message: "[skip ci] Updated translations via Crowdin"
  484. remote: "git@github.com:go-gitea/gitea.git"
  485. environment:
  486. GIT_PUSH_SSH_KEY:
  487. from_secret: git_push_ssh_key
  488. - name: upload_translations
  489. image: jonasfranz/crowdin
  490. pull: always
  491. settings:
  492. files:
  493. locale_en-US.ini: options/locale/locale_en-US.ini
  494. ignore_branch: true
  495. project_identifier: gitea
  496. environment:
  497. CROWDIN_KEY:
  498. from_secret: crowdin_key
  499. ---
  500. kind: pipeline
  501. type: docker
  502. name: update_gitignore_and_licenses
  503. platform:
  504. os: linux
  505. arch: arm64
  506. trigger:
  507. branch:
  508. - main
  509. event:
  510. - cron
  511. cron:
  512. - update_gitignore_and_licenses
  513. steps:
  514. - name: download
  515. image: golang:1.18
  516. pull: always
  517. commands:
  518. - timeout -s ABRT 40m make generate-license generate-gitignore
  519. - name: push
  520. image: appleboy/drone-git-push
  521. pull: always
  522. settings:
  523. author_email: "teabot@gitea.io"
  524. author_name: GiteaBot
  525. branch: main
  526. commit: true
  527. commit_message: "[skip ci] Updated licenses and gitignores "
  528. remote: "git@github.com:go-gitea/gitea.git"
  529. environment:
  530. GIT_PUSH_SSH_KEY:
  531. from_secret: git_push_ssh_key
  532. ---
  533. kind: pipeline
  534. type: docker
  535. name: release-latest
  536. platform:
  537. os: linux
  538. arch: amd64
  539. workspace:
  540. base: /source
  541. path: /
  542. trigger:
  543. branch:
  544. - main
  545. - "release/*"
  546. event:
  547. - push
  548. depends_on:
  549. - testing-amd64
  550. - testing-arm64
  551. volumes:
  552. - name: deps
  553. temp: {}
  554. steps:
  555. - name: fetch-tags
  556. image: docker:git
  557. pull: always
  558. commands:
  559. - git fetch --tags --force
  560. - name: deps-frontend
  561. image: node:16
  562. pull: always
  563. commands:
  564. - make deps-frontend
  565. - name: deps-backend
  566. image: golang:1.18
  567. pull: always
  568. commands:
  569. - make deps-backend
  570. volumes:
  571. - name: deps
  572. path: /go
  573. - name: static
  574. image: techknowlogick/xgo:go-1.18.x
  575. pull: always
  576. commands:
  577. - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
  578. - export PATH=$PATH:$GOPATH/bin
  579. - make release
  580. environment:
  581. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  582. TAGS: bindata sqlite sqlite_unlock_notify
  583. volumes:
  584. - name: deps
  585. path: /go
  586. - name: gpg-sign
  587. image: plugins/gpgsign:1
  588. pull: always
  589. settings:
  590. detach_sign: true
  591. excludes:
  592. - "dist/release/*.sha256"
  593. files:
  594. - "dist/release/*"
  595. environment:
  596. GPGSIGN_KEY:
  597. from_secret: gpgsign_key
  598. GPGSIGN_PASSPHRASE:
  599. from_secret: gpgsign_passphrase
  600. - name: release-branch
  601. image: woodpeckerci/plugin-s3:latest
  602. pull: always
  603. settings:
  604. acl: public-read
  605. bucket: gitea-artifacts
  606. endpoint: https://ams3.digitaloceanspaces.com
  607. path_style: true
  608. source: "dist/release/*"
  609. strip_prefix: dist/release/
  610. target: "/gitea/${DRONE_BRANCH##release/v}"
  611. environment:
  612. AWS_ACCESS_KEY_ID:
  613. from_secret: aws_access_key_id
  614. AWS_SECRET_ACCESS_KEY:
  615. from_secret: aws_secret_access_key
  616. when:
  617. branch:
  618. - "release/*"
  619. event:
  620. - push
  621. - name: release-main
  622. image: woodpeckerci/plugin-s3:latest
  623. settings:
  624. acl: public-read
  625. bucket: gitea-artifacts
  626. endpoint: https://ams3.digitaloceanspaces.com
  627. path_style: true
  628. source: "dist/release/*"
  629. strip_prefix: dist/release/
  630. target: /gitea/main
  631. environment:
  632. AWS_ACCESS_KEY_ID:
  633. from_secret: aws_access_key_id
  634. AWS_SECRET_ACCESS_KEY:
  635. from_secret: aws_secret_access_key
  636. when:
  637. branch:
  638. - main
  639. event:
  640. - push
  641. ---
  642. kind: pipeline
  643. name: release-version
  644. platform:
  645. os: linux
  646. arch: amd64
  647. workspace:
  648. base: /source
  649. path: /
  650. trigger:
  651. event:
  652. - tag
  653. depends_on:
  654. - testing-arm64
  655. - testing-amd64
  656. volumes:
  657. - name: deps
  658. temp: {}
  659. steps:
  660. - name: fetch-tags
  661. image: docker:git
  662. pull: always
  663. commands:
  664. - git fetch --tags --force
  665. - name: deps-frontend
  666. image: node:16
  667. pull: always
  668. commands:
  669. - make deps-frontend
  670. - name: deps-backend
  671. image: golang:1.18
  672. pull: always
  673. commands:
  674. - make deps-backend
  675. volumes:
  676. - name: deps
  677. path: /go
  678. - name: static
  679. image: techknowlogick/xgo:go-1.18.x
  680. pull: always
  681. commands:
  682. - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
  683. - export PATH=$PATH:$GOPATH/bin
  684. - make release
  685. environment:
  686. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  687. TAGS: bindata sqlite sqlite_unlock_notify
  688. depends_on: [fetch-tags]
  689. volumes:
  690. - name: deps
  691. path: /go
  692. - name: gpg-sign
  693. image: plugins/gpgsign:1
  694. pull: always
  695. settings:
  696. detach_sign: true
  697. excludes:
  698. - "dist/release/*.sha256"
  699. files:
  700. - "dist/release/*"
  701. environment:
  702. GPGSIGN_KEY:
  703. from_secret: gpgsign_key
  704. GPGSIGN_PASSPHRASE:
  705. from_secret: gpgsign_passphrase
  706. depends_on: [static]
  707. - name: release-tag
  708. image: woodpeckerci/plugin-s3:latest
  709. pull: always
  710. settings:
  711. acl: public-read
  712. bucket: gitea-artifacts
  713. endpoint: https://ams3.digitaloceanspaces.com
  714. path_style: true
  715. source: "dist/release/*"
  716. strip_prefix: dist/release/
  717. target: "/gitea/${DRONE_TAG##v}"
  718. environment:
  719. AWS_ACCESS_KEY_ID:
  720. from_secret: aws_access_key_id
  721. AWS_SECRET_ACCESS_KEY:
  722. from_secret: aws_secret_access_key
  723. depends_on: [gpg-sign]
  724. - name: github
  725. image: plugins/github-release:latest
  726. pull: always
  727. settings:
  728. files:
  729. - "dist/release/*"
  730. file_exists: overwrite
  731. environment:
  732. GITHUB_TOKEN:
  733. from_secret: github_token
  734. depends_on: [gpg-sign]
  735. ---
  736. kind: pipeline
  737. type: docker
  738. name: docs
  739. platform:
  740. os: linux
  741. arch: arm64
  742. depends_on:
  743. - compliance
  744. trigger:
  745. event:
  746. - push
  747. - tag
  748. - pull_request
  749. steps:
  750. - name: build-docs
  751. image: plugins/hugo:latest
  752. pull: always
  753. commands:
  754. - apk add --no-cache make bash curl
  755. - cd docs
  756. - make trans-copy clean build
  757. - name: publish-docs
  758. image: techknowlogick/drone-netlify:latest
  759. pull: always
  760. settings:
  761. path: docs/public/
  762. site_id: d2260bae-7861-4c02-8646-8f6440b12672
  763. environment:
  764. NETLIFY_TOKEN:
  765. from_secret: netlify_token
  766. when:
  767. branch:
  768. - main
  769. event:
  770. - push
  771. ---
  772. kind: pipeline
  773. type: docker
  774. name: docker-linux-amd64-release-version
  775. platform:
  776. os: linux
  777. arch: amd64
  778. depends_on:
  779. - testing-amd64
  780. - testing-arm64
  781. trigger:
  782. ref:
  783. - "refs/tags/**"
  784. event:
  785. exclude:
  786. - cron
  787. steps:
  788. - name: fetch-tags
  789. image: docker:git
  790. pull: always
  791. commands:
  792. - git fetch --tags --force
  793. - name: publish
  794. image: techknowlogick/drone-docker:latest
  795. pull: always
  796. settings:
  797. auto_tag: true
  798. auto_tag_suffix: linux-amd64
  799. repo: gitea/gitea
  800. build_args:
  801. - GOPROXY=https://goproxy.io
  802. password:
  803. from_secret: docker_password
  804. username:
  805. from_secret: docker_username
  806. when:
  807. event:
  808. exclude:
  809. - pull_request
  810. - name: publish-rootless
  811. image: techknowlogick/drone-docker:latest
  812. settings:
  813. dockerfile: Dockerfile.rootless
  814. auto_tag: true
  815. auto_tag_suffix: linux-amd64-rootless
  816. repo: gitea/gitea
  817. build_args:
  818. - GOPROXY=https://goproxy.io
  819. password:
  820. from_secret: docker_password
  821. username:
  822. from_secret: docker_username
  823. when:
  824. event:
  825. exclude:
  826. - pull_request
  827. ---
  828. kind: pipeline
  829. type: docker
  830. name: docker-linux-amd64-release
  831. platform:
  832. os: linux
  833. arch: amd64
  834. depends_on:
  835. - testing-amd64
  836. - testing-arm64
  837. trigger:
  838. ref:
  839. - refs/heads/main
  840. event:
  841. exclude:
  842. - cron
  843. steps:
  844. - name: fetch-tags
  845. image: docker:git
  846. pull: always
  847. commands:
  848. - git fetch --tags --force
  849. - name: publish
  850. image: techknowlogick/drone-docker:latest
  851. pull: always
  852. settings:
  853. auto_tag: false
  854. tags: dev-linux-amd64
  855. repo: gitea/gitea
  856. build_args:
  857. - GOPROXY=https://goproxy.io
  858. password:
  859. from_secret: docker_password
  860. username:
  861. from_secret: docker_username
  862. when:
  863. event:
  864. exclude:
  865. - pull_request
  866. - name: publish-rootless
  867. image: techknowlogick/drone-docker:latest
  868. settings:
  869. dockerfile: Dockerfile.rootless
  870. auto_tag: false
  871. tags: dev-linux-amd64-rootless
  872. repo: gitea/gitea
  873. build_args:
  874. - GOPROXY=https://goproxy.io
  875. password:
  876. from_secret: docker_password
  877. username:
  878. from_secret: docker_username
  879. when:
  880. event:
  881. exclude:
  882. - pull_request
  883. ---
  884. kind: pipeline
  885. name: docker-linux-amd64-release-branch
  886. platform:
  887. os: linux
  888. arch: amd64
  889. depends_on:
  890. - testing-amd64
  891. - testing-arm64
  892. trigger:
  893. ref:
  894. - "refs/heads/release/v*"
  895. event:
  896. exclude:
  897. - cron
  898. steps:
  899. - name: fetch-tags
  900. image: docker:git
  901. pull: always
  902. commands:
  903. - git fetch --tags --force
  904. - name: publish
  905. image: techknowlogick/drone-docker:latest
  906. pull: always
  907. settings:
  908. auto_tag: false
  909. tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64
  910. repo: gitea/gitea
  911. build_args:
  912. - GOPROXY=https://goproxy.io
  913. password:
  914. from_secret: docker_password
  915. username:
  916. from_secret: docker_username
  917. when:
  918. event:
  919. exclude:
  920. - pull_request
  921. - name: publish-rootless
  922. image: techknowlogick/drone-docker:latest
  923. settings:
  924. dockerfile: Dockerfile.rootless
  925. auto_tag: false
  926. tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64-rootless
  927. repo: gitea/gitea
  928. build_args:
  929. - GOPROXY=https://goproxy.io
  930. password:
  931. from_secret: docker_password
  932. username:
  933. from_secret: docker_username
  934. when:
  935. event:
  936. exclude:
  937. - pull_request
  938. ---
  939. kind: pipeline
  940. type: docker
  941. name: docker-linux-arm64-dry-run
  942. platform:
  943. os: linux
  944. arch: arm64
  945. depends_on:
  946. - compliance
  947. trigger:
  948. ref:
  949. - "refs/pull/**"
  950. steps:
  951. - name: dryrun
  952. image: techknowlogick/drone-docker:latest
  953. pull: always
  954. settings:
  955. dry_run: true
  956. repo: gitea/gitea
  957. tags: linux-arm64
  958. build_args:
  959. - GOPROXY=https://goproxy.io
  960. environment:
  961. PLUGIN_MIRROR:
  962. from_secret: plugin_mirror
  963. when:
  964. event:
  965. - pull_request
  966. ---
  967. kind: pipeline
  968. type: docker
  969. name: docker-linux-arm64-release-version
  970. platform:
  971. os: linux
  972. arch: arm64
  973. depends_on:
  974. - testing-amd64
  975. - testing-arm64
  976. trigger:
  977. ref:
  978. - "refs/tags/**"
  979. event:
  980. exclude:
  981. - cron
  982. steps:
  983. - name: fetch-tags
  984. image: docker:git
  985. pull: always
  986. commands:
  987. - git fetch --tags --force
  988. - name: publish
  989. image: techknowlogick/drone-docker:latest
  990. pull: always
  991. settings:
  992. auto_tag: true
  993. auto_tag_suffix: linux-arm64
  994. repo: gitea/gitea
  995. build_args:
  996. - GOPROXY=https://goproxy.io
  997. password:
  998. from_secret: docker_password
  999. username:
  1000. from_secret: docker_username
  1001. when:
  1002. event:
  1003. exclude:
  1004. - pull_request
  1005. - name: publish-rootless
  1006. image: techknowlogick/drone-docker:latest
  1007. settings:
  1008. dockerfile: Dockerfile.rootless
  1009. auto_tag: true
  1010. auto_tag_suffix: linux-arm64-rootless
  1011. repo: gitea/gitea
  1012. build_args:
  1013. - GOPROXY=https://goproxy.io
  1014. password:
  1015. from_secret: docker_password
  1016. username:
  1017. from_secret: docker_username
  1018. when:
  1019. event:
  1020. exclude:
  1021. - pull_request
  1022. ---
  1023. kind: pipeline
  1024. type: docker
  1025. name: docker-linux-arm64-release
  1026. platform:
  1027. os: linux
  1028. arch: arm64
  1029. depends_on:
  1030. - testing-amd64
  1031. - testing-arm64
  1032. trigger:
  1033. ref:
  1034. - refs/heads/main
  1035. event:
  1036. exclude:
  1037. - cron
  1038. steps:
  1039. - name: fetch-tags
  1040. image: docker:git
  1041. pull: always
  1042. commands:
  1043. - git fetch --tags --force
  1044. - name: publish
  1045. image: techknowlogick/drone-docker:latest
  1046. pull: always
  1047. settings:
  1048. auto_tag: false
  1049. tags: dev-linux-arm64
  1050. repo: gitea/gitea
  1051. build_args:
  1052. - GOPROXY=https://goproxy.io
  1053. password:
  1054. from_secret: docker_password
  1055. username:
  1056. from_secret: docker_username
  1057. when:
  1058. event:
  1059. exclude:
  1060. - pull_request
  1061. - name: publish-rootless
  1062. image: techknowlogick/drone-docker:latest
  1063. settings:
  1064. dockerfile: Dockerfile.rootless
  1065. auto_tag: false
  1066. tags: dev-linux-arm64-rootless
  1067. repo: gitea/gitea
  1068. build_args:
  1069. - GOPROXY=https://goproxy.io
  1070. password:
  1071. from_secret: docker_password
  1072. username:
  1073. from_secret: docker_username
  1074. when:
  1075. event:
  1076. exclude:
  1077. - pull_request
  1078. ---
  1079. kind: pipeline
  1080. name: docker-linux-arm64-release-branch
  1081. platform:
  1082. os: linux
  1083. arch: arm64
  1084. depends_on:
  1085. - testing-amd64
  1086. - testing-arm64
  1087. trigger:
  1088. ref:
  1089. - "refs/heads/release/v*"
  1090. event:
  1091. exclude:
  1092. - cron
  1093. steps:
  1094. - name: fetch-tags
  1095. image: docker:git
  1096. pull: always
  1097. commands:
  1098. - git fetch --tags --force
  1099. - name: publish
  1100. image: techknowlogick/drone-docker:latest
  1101. pull: always
  1102. settings:
  1103. auto_tag: false
  1104. tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64
  1105. repo: gitea/gitea
  1106. build_args:
  1107. - GOPROXY=https://goproxy.io
  1108. password:
  1109. from_secret: docker_password
  1110. username:
  1111. from_secret: docker_username
  1112. when:
  1113. event:
  1114. exclude:
  1115. - pull_request
  1116. - name: publish-rootless
  1117. image: techknowlogick/drone-docker:latest
  1118. settings:
  1119. dockerfile: Dockerfile.rootless
  1120. auto_tag: false
  1121. tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64-rootless
  1122. repo: gitea/gitea
  1123. build_args:
  1124. - GOPROXY=https://goproxy.io
  1125. password:
  1126. from_secret: docker_password
  1127. username:
  1128. from_secret: docker_username
  1129. when:
  1130. event:
  1131. exclude:
  1132. - pull_request
  1133. ---
  1134. kind: pipeline
  1135. type: docker
  1136. name: docker-manifest-version
  1137. platform:
  1138. os: linux
  1139. arch: amd64
  1140. steps:
  1141. - name: manifest-rootless
  1142. image: plugins/manifest
  1143. pull: always
  1144. settings:
  1145. auto_tag: true
  1146. ignore_missing: true
  1147. spec: docker/manifest.rootless.tmpl
  1148. password:
  1149. from_secret: docker_password
  1150. username:
  1151. from_secret: docker_username
  1152. - name: manifest
  1153. image: plugins/manifest
  1154. settings:
  1155. auto_tag: true
  1156. ignore_missing: true
  1157. spec: docker/manifest.tmpl
  1158. password:
  1159. from_secret: docker_password
  1160. username:
  1161. from_secret: docker_username
  1162. trigger:
  1163. ref:
  1164. - "refs/tags/**"
  1165. event:
  1166. exclude:
  1167. - cron
  1168. depends_on:
  1169. - docker-linux-amd64-release-version
  1170. - docker-linux-arm64-release-version
  1171. ---
  1172. kind: pipeline
  1173. type: docker
  1174. name: docker-manifest
  1175. platform:
  1176. os: linux
  1177. arch: amd64
  1178. steps:
  1179. - name: manifest-rootless
  1180. pull: always
  1181. image: plugins/manifest
  1182. pull: always
  1183. settings:
  1184. auto_tag: false
  1185. ignore_missing: true
  1186. spec: docker/manifest.rootless.tmpl
  1187. password:
  1188. from_secret: docker_password
  1189. username:
  1190. from_secret: docker_username
  1191. - name: manifest
  1192. image: plugins/manifest
  1193. settings:
  1194. auto_tag: false
  1195. ignore_missing: true
  1196. spec: docker/manifest.tmpl
  1197. password:
  1198. from_secret: docker_password
  1199. username:
  1200. from_secret: docker_username
  1201. trigger:
  1202. ref:
  1203. - refs/heads/main
  1204. - "refs/heads/release/v*"
  1205. event:
  1206. exclude:
  1207. - cron
  1208. depends_on:
  1209. - docker-linux-amd64-release
  1210. - docker-linux-arm64-release
  1211. - docker-linux-amd64-release-branch
  1212. - docker-linux-arm64-release-branch
  1213. ---
  1214. kind: pipeline
  1215. type: docker
  1216. name: notifications
  1217. platform:
  1218. os: linux
  1219. arch: arm64
  1220. clone:
  1221. disable: true
  1222. trigger:
  1223. branch:
  1224. - main
  1225. - "release/*"
  1226. event:
  1227. - push
  1228. - tag
  1229. status:
  1230. - success
  1231. - failure
  1232. depends_on:
  1233. - testing-amd64
  1234. - testing-arm64
  1235. - release-version
  1236. - release-latest
  1237. - docker-linux-amd64-release
  1238. - docker-linux-arm64-release
  1239. - docker-linux-amd64-release-version
  1240. - docker-linux-arm64-release-version
  1241. - docker-linux-amd64-release-branch
  1242. - docker-linux-arm64-release-branch
  1243. - docker-manifest
  1244. - docker-manifest-version
  1245. - docs
  1246. steps:
  1247. - name: discord
  1248. image: appleboy/drone-discord:1.2.4
  1249. pull: always
  1250. settings:
  1251. message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{/success}}\n"
  1252. webhook_id:
  1253. from_secret: discord_webhook_id
  1254. webhook_token:
  1255. from_secret: discord_webhook_token