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

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