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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407
  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:1
  717. pull: always
  718. settings:
  719. files:
  720. - "dist/release/*"
  721. environment:
  722. GITHUB_TOKEN:
  723. from_secret: github_token
  724. depends_on: [gpg-sign]
  725. ---
  726. kind: pipeline
  727. type: docker
  728. name: docs
  729. platform:
  730. os: linux
  731. arch: arm64
  732. depends_on:
  733. - compliance
  734. trigger:
  735. event:
  736. - push
  737. - tag
  738. - pull_request
  739. steps:
  740. - name: build-docs
  741. image: plugins/hugo:latest
  742. pull: always
  743. commands:
  744. - apk add --no-cache make bash curl
  745. - cd docs
  746. - make trans-copy clean build
  747. - name: publish-docs
  748. image: techknowlogick/drone-netlify:latest
  749. pull: always
  750. settings:
  751. path: docs/public/
  752. site_id: d2260bae-7861-4c02-8646-8f6440b12672
  753. environment:
  754. NETLIFY_TOKEN:
  755. from_secret: netlify_token
  756. when:
  757. branch:
  758. - main
  759. event:
  760. - push
  761. ---
  762. kind: pipeline
  763. type: docker
  764. name: docker-linux-amd64-release-version
  765. platform:
  766. os: linux
  767. arch: amd64
  768. depends_on:
  769. - testing-amd64
  770. - testing-arm64
  771. trigger:
  772. ref:
  773. - "refs/tags/**"
  774. event:
  775. exclude:
  776. - cron
  777. steps:
  778. - name: fetch-tags
  779. image: docker:git
  780. pull: always
  781. commands:
  782. - git fetch --tags --force
  783. - name: publish
  784. image: techknowlogick/drone-docker:latest
  785. pull: always
  786. settings:
  787. auto_tag: true
  788. auto_tag_suffix: linux-amd64
  789. repo: gitea/gitea
  790. build_args:
  791. - GOPROXY=https://goproxy.cn
  792. password:
  793. from_secret: docker_password
  794. username:
  795. from_secret: docker_username
  796. when:
  797. event:
  798. exclude:
  799. - pull_request
  800. - name: publish-rootless
  801. image: techknowlogick/drone-docker:latest
  802. settings:
  803. dockerfile: Dockerfile.rootless
  804. auto_tag: true
  805. auto_tag_suffix: linux-amd64-rootless
  806. repo: gitea/gitea
  807. build_args:
  808. - GOPROXY=https://goproxy.cn
  809. password:
  810. from_secret: docker_password
  811. username:
  812. from_secret: docker_username
  813. when:
  814. event:
  815. exclude:
  816. - pull_request
  817. ---
  818. kind: pipeline
  819. type: docker
  820. name: docker-linux-amd64-release
  821. platform:
  822. os: linux
  823. arch: amd64
  824. depends_on:
  825. - testing-amd64
  826. - testing-arm64
  827. trigger:
  828. ref:
  829. - refs/heads/main
  830. event:
  831. exclude:
  832. - cron
  833. steps:
  834. - name: fetch-tags
  835. image: docker:git
  836. pull: always
  837. commands:
  838. - git fetch --tags --force
  839. - name: publish
  840. image: techknowlogick/drone-docker:latest
  841. pull: always
  842. settings:
  843. auto_tag: false
  844. tags: dev-linux-amd64
  845. repo: gitea/gitea
  846. build_args:
  847. - GOPROXY=https://goproxy.cn
  848. password:
  849. from_secret: docker_password
  850. username:
  851. from_secret: docker_username
  852. when:
  853. event:
  854. exclude:
  855. - pull_request
  856. - name: publish-rootless
  857. image: techknowlogick/drone-docker:latest
  858. settings:
  859. dockerfile: Dockerfile.rootless
  860. auto_tag: false
  861. tags: dev-linux-amd64-rootless
  862. repo: gitea/gitea
  863. build_args:
  864. - GOPROXY=https://goproxy.cn
  865. password:
  866. from_secret: docker_password
  867. username:
  868. from_secret: docker_username
  869. when:
  870. event:
  871. exclude:
  872. - pull_request
  873. ---
  874. kind: pipeline
  875. name: docker-linux-amd64-release-branch
  876. platform:
  877. os: linux
  878. arch: amd64
  879. depends_on:
  880. - testing-amd64
  881. - testing-arm64
  882. trigger:
  883. ref:
  884. - "refs/heads/release/v*"
  885. event:
  886. exclude:
  887. - cron
  888. steps:
  889. - name: fetch-tags
  890. image: docker:git
  891. pull: always
  892. commands:
  893. - git fetch --tags --force
  894. - name: publish
  895. image: techknowlogick/drone-docker:latest
  896. pull: always
  897. settings:
  898. auto_tag: false
  899. tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64
  900. repo: gitea/gitea
  901. build_args:
  902. - GOPROXY=https://goproxy.cn
  903. password:
  904. from_secret: docker_password
  905. username:
  906. from_secret: docker_username
  907. when:
  908. event:
  909. exclude:
  910. - pull_request
  911. - name: publish-rootless
  912. image: techknowlogick/drone-docker:latest
  913. settings:
  914. dockerfile: Dockerfile.rootless
  915. auto_tag: false
  916. tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64-rootless
  917. repo: gitea/gitea
  918. build_args:
  919. - GOPROXY=https://goproxy.cn
  920. password:
  921. from_secret: docker_password
  922. username:
  923. from_secret: docker_username
  924. when:
  925. event:
  926. exclude:
  927. - pull_request
  928. ---
  929. kind: pipeline
  930. type: docker
  931. name: docker-linux-arm64-dry-run
  932. platform:
  933. os: linux
  934. arch: arm64
  935. depends_on:
  936. - compliance
  937. trigger:
  938. ref:
  939. - "refs/pull/**"
  940. steps:
  941. - name: dryrun
  942. image: techknowlogick/drone-docker:latest
  943. pull: always
  944. settings:
  945. dry_run: true
  946. repo: gitea/gitea
  947. tags: linux-arm64
  948. build_args:
  949. - GOPROXY=https://goproxy.cn
  950. environment:
  951. PLUGIN_MIRROR:
  952. from_secret: plugin_mirror
  953. when:
  954. event:
  955. - pull_request
  956. ---
  957. kind: pipeline
  958. type: docker
  959. name: docker-linux-arm64-release-version
  960. platform:
  961. os: linux
  962. arch: arm64
  963. depends_on:
  964. - testing-amd64
  965. - testing-arm64
  966. trigger:
  967. ref:
  968. - "refs/tags/**"
  969. event:
  970. exclude:
  971. - cron
  972. steps:
  973. - name: fetch-tags
  974. image: docker:git
  975. pull: always
  976. commands:
  977. - git fetch --tags --force
  978. - name: publish
  979. image: techknowlogick/drone-docker:latest
  980. pull: always
  981. settings:
  982. auto_tag: true
  983. auto_tag_suffix: linux-arm64
  984. repo: gitea/gitea
  985. build_args:
  986. - GOPROXY=https://goproxy.cn
  987. password:
  988. from_secret: docker_password
  989. username:
  990. from_secret: docker_username
  991. when:
  992. event:
  993. exclude:
  994. - pull_request
  995. - name: publish-rootless
  996. image: techknowlogick/drone-docker:latest
  997. settings:
  998. dockerfile: Dockerfile.rootless
  999. auto_tag: true
  1000. auto_tag_suffix: linux-arm64-rootless
  1001. repo: gitea/gitea
  1002. build_args:
  1003. - GOPROXY=https://goproxy.cn
  1004. password:
  1005. from_secret: docker_password
  1006. username:
  1007. from_secret: docker_username
  1008. when:
  1009. event:
  1010. exclude:
  1011. - pull_request
  1012. ---
  1013. kind: pipeline
  1014. type: docker
  1015. name: docker-linux-arm64-release
  1016. platform:
  1017. os: linux
  1018. arch: arm64
  1019. depends_on:
  1020. - testing-amd64
  1021. - testing-arm64
  1022. trigger:
  1023. ref:
  1024. - refs/heads/main
  1025. event:
  1026. exclude:
  1027. - cron
  1028. steps:
  1029. - name: fetch-tags
  1030. image: docker:git
  1031. pull: always
  1032. commands:
  1033. - git fetch --tags --force
  1034. - name: publish
  1035. image: techknowlogick/drone-docker:latest
  1036. pull: always
  1037. settings:
  1038. auto_tag: false
  1039. tags: dev-linux-arm64
  1040. repo: gitea/gitea
  1041. build_args:
  1042. - GOPROXY=https://goproxy.cn
  1043. password:
  1044. from_secret: docker_password
  1045. username:
  1046. from_secret: docker_username
  1047. when:
  1048. event:
  1049. exclude:
  1050. - pull_request
  1051. - name: publish-rootless
  1052. image: techknowlogick/drone-docker:latest
  1053. settings:
  1054. dockerfile: Dockerfile.rootless
  1055. auto_tag: false
  1056. tags: dev-linux-arm64-rootless
  1057. repo: gitea/gitea
  1058. build_args:
  1059. - GOPROXY=https://goproxy.cn
  1060. password:
  1061. from_secret: docker_password
  1062. username:
  1063. from_secret: docker_username
  1064. when:
  1065. event:
  1066. exclude:
  1067. - pull_request
  1068. ---
  1069. kind: pipeline
  1070. name: docker-linux-arm64-release-branch
  1071. platform:
  1072. os: linux
  1073. arch: arm64
  1074. depends_on:
  1075. - testing-amd64
  1076. - testing-arm64
  1077. trigger:
  1078. ref:
  1079. - "refs/heads/release/v*"
  1080. event:
  1081. exclude:
  1082. - cron
  1083. steps:
  1084. - name: fetch-tags
  1085. image: docker:git
  1086. pull: always
  1087. commands:
  1088. - git fetch --tags --force
  1089. - name: publish
  1090. image: techknowlogick/drone-docker:latest
  1091. pull: always
  1092. settings:
  1093. auto_tag: false
  1094. tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64
  1095. repo: gitea/gitea
  1096. build_args:
  1097. - GOPROXY=https://goproxy.cn
  1098. password:
  1099. from_secret: docker_password
  1100. username:
  1101. from_secret: docker_username
  1102. when:
  1103. event:
  1104. exclude:
  1105. - pull_request
  1106. - name: publish-rootless
  1107. image: techknowlogick/drone-docker:latest
  1108. settings:
  1109. dockerfile: Dockerfile.rootless
  1110. auto_tag: false
  1111. tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64-rootless
  1112. repo: gitea/gitea
  1113. build_args:
  1114. - GOPROXY=https://goproxy.cn
  1115. password:
  1116. from_secret: docker_password
  1117. username:
  1118. from_secret: docker_username
  1119. when:
  1120. event:
  1121. exclude:
  1122. - pull_request
  1123. ---
  1124. kind: pipeline
  1125. type: docker
  1126. name: docker-manifest-version
  1127. platform:
  1128. os: linux
  1129. arch: amd64
  1130. steps:
  1131. - name: manifest-rootless
  1132. image: plugins/manifest
  1133. pull: always
  1134. settings:
  1135. auto_tag: true
  1136. ignore_missing: true
  1137. spec: docker/manifest.rootless.tmpl
  1138. password:
  1139. from_secret: docker_password
  1140. username:
  1141. from_secret: docker_username
  1142. - name: manifest
  1143. image: plugins/manifest
  1144. settings:
  1145. auto_tag: true
  1146. ignore_missing: true
  1147. spec: docker/manifest.tmpl
  1148. password:
  1149. from_secret: docker_password
  1150. username:
  1151. from_secret: docker_username
  1152. trigger:
  1153. ref:
  1154. - "refs/tags/**"
  1155. event:
  1156. exclude:
  1157. - cron
  1158. depends_on:
  1159. - docker-linux-amd64-release-version
  1160. - docker-linux-arm64-release-version
  1161. ---
  1162. kind: pipeline
  1163. type: docker
  1164. name: docker-manifest
  1165. platform:
  1166. os: linux
  1167. arch: amd64
  1168. steps:
  1169. - name: manifest-rootless
  1170. pull: always
  1171. image: plugins/manifest
  1172. pull: always
  1173. settings:
  1174. auto_tag: false
  1175. ignore_missing: true
  1176. spec: docker/manifest.rootless.tmpl
  1177. password:
  1178. from_secret: docker_password
  1179. username:
  1180. from_secret: docker_username
  1181. - name: manifest
  1182. image: plugins/manifest
  1183. settings:
  1184. auto_tag: false
  1185. ignore_missing: true
  1186. spec: docker/manifest.tmpl
  1187. password:
  1188. from_secret: docker_password
  1189. username:
  1190. from_secret: docker_username
  1191. trigger:
  1192. ref:
  1193. - refs/heads/main
  1194. - "refs/heads/release/v*"
  1195. event:
  1196. exclude:
  1197. - cron
  1198. depends_on:
  1199. - docker-linux-amd64-release
  1200. - docker-linux-arm64-release
  1201. - docker-linux-amd64-release-branch
  1202. - docker-linux-arm64-release-branch
  1203. ---
  1204. kind: pipeline
  1205. type: docker
  1206. name: notifications
  1207. platform:
  1208. os: linux
  1209. arch: arm64
  1210. clone:
  1211. disable: true
  1212. trigger:
  1213. branch:
  1214. - main
  1215. - "release/*"
  1216. event:
  1217. - push
  1218. - tag
  1219. status:
  1220. - success
  1221. - failure
  1222. depends_on:
  1223. - testing-amd64
  1224. - testing-arm64
  1225. - release-version
  1226. - release-latest
  1227. - docker-linux-amd64-release
  1228. - docker-linux-arm64-release
  1229. - docker-linux-amd64-release-version
  1230. - docker-linux-arm64-release-version
  1231. - docker-linux-amd64-release-branch
  1232. - docker-linux-arm64-release-branch
  1233. - docker-manifest
  1234. - docker-manifest-version
  1235. - docs
  1236. steps:
  1237. - name: discord
  1238. image: appleboy/drone-discord:1.2.4
  1239. pull: always
  1240. settings:
  1241. 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"
  1242. webhook_id:
  1243. from_secret: discord_webhook_id
  1244. webhook_token:
  1245. from_secret: discord_webhook_token