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

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