Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

.drone.yml 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122
  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: unit-test
  182. image: golang:1.17
  183. commands:
  184. - make unit-test-coverage test-check
  185. environment:
  186. GOPROXY: off
  187. TAGS: bindata sqlite sqlite_unlock_notify
  188. RACE_ENABLED: true
  189. GITHUB_READ_TOKEN:
  190. from_secret: github_read_token
  191. - name: unit-test-gogit
  192. pull: always
  193. image: golang:1.17
  194. commands:
  195. - make unit-test-coverage test-check
  196. environment:
  197. GOPROXY: off
  198. TAGS: bindata gogit sqlite sqlite_unlock_notify
  199. RACE_ENABLED: true
  200. GITHUB_READ_TOKEN:
  201. from_secret: github_read_token
  202. - name: test-mysql
  203. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  204. commands:
  205. - make test-mysql-migration integration-test-coverage
  206. environment:
  207. GOPROXY: off
  208. TAGS: bindata
  209. RACE_ENABLED: true
  210. TEST_LDAP: 1
  211. USE_REPO_TEST_DIR: 1
  212. TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200"
  213. depends_on:
  214. - build
  215. - name: test-mysql8
  216. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  217. commands:
  218. - timeout -s ABRT 40m make test-mysql8-migration test-mysql8
  219. environment:
  220. GOPROXY: off
  221. TAGS: bindata
  222. RACE_ENABLED: true
  223. TEST_LDAP: 1
  224. USE_REPO_TEST_DIR: 1
  225. depends_on:
  226. - build
  227. - name: test-mssql
  228. image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
  229. commands:
  230. - make test-mssql-migration test-mssql
  231. environment:
  232. GOPROXY: off
  233. TAGS: bindata
  234. RACE_ENABLED: true
  235. TEST_LDAP: 1
  236. USE_REPO_TEST_DIR: 1
  237. depends_on:
  238. - build
  239. - name: generate-coverage
  240. image: golang:1.17
  241. commands:
  242. - make coverage
  243. environment:
  244. GOPROXY: off
  245. TAGS: bindata
  246. depends_on:
  247. - unit-test
  248. - test-mysql
  249. when:
  250. branch:
  251. - main
  252. event:
  253. - push
  254. - pull_request
  255. - name: coverage-codecov
  256. pull: always
  257. image: plugins/codecov
  258. settings:
  259. files:
  260. - coverage.all
  261. token:
  262. from_secret: codecov_token
  263. depends_on:
  264. - generate-coverage
  265. when:
  266. branch:
  267. - main
  268. event:
  269. - push
  270. - pull_request
  271. ---
  272. kind: pipeline
  273. name: testing-arm64
  274. platform:
  275. os: linux
  276. arch: arm64
  277. depends_on:
  278. - compliance
  279. trigger:
  280. event:
  281. - push
  282. - tag
  283. - pull_request
  284. services:
  285. - name: pgsql
  286. pull: default
  287. image: postgres:10
  288. environment:
  289. POSTGRES_DB: test
  290. POSTGRES_PASSWORD: postgres
  291. - name: ldap
  292. pull: default
  293. image: gitea/test-openldap:latest
  294. steps:
  295. - name: fetch-tags
  296. image: docker:git
  297. commands:
  298. - git fetch --tags --force
  299. when:
  300. event:
  301. exclude:
  302. - pull_request
  303. - name: build
  304. pull: always
  305. image: golang:1.17
  306. commands:
  307. - make backend
  308. environment:
  309. GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
  310. GOSUMDB: sum.golang.org
  311. TAGS: bindata gogit sqlite sqlite_unlock_notify
  312. - name: test-sqlite
  313. image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
  314. commands:
  315. - timeout -s ABRT 40m make test-sqlite-migration test-sqlite
  316. environment:
  317. GOPROXY: off
  318. TAGS: bindata gogit sqlite sqlite_unlock_notify
  319. RACE_ENABLED: true
  320. TEST_TAGS: gogit sqlite sqlite_unlock_notify
  321. USE_REPO_TEST_DIR: 1
  322. depends_on:
  323. - build
  324. - name: test-pgsql
  325. image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
  326. commands:
  327. - timeout -s ABRT 40m make test-pgsql-migration test-pgsql
  328. environment:
  329. GOPROXY: off
  330. TAGS: bindata gogit
  331. RACE_ENABLED: true
  332. TEST_TAGS: gogit
  333. TEST_LDAP: 1
  334. USE_REPO_TEST_DIR: 1
  335. depends_on:
  336. - build
  337. ---
  338. kind: pipeline
  339. name: update_translations
  340. platform:
  341. os: linux
  342. arch: arm64
  343. trigger:
  344. branch:
  345. - main
  346. event:
  347. - cron
  348. cron:
  349. - update_translations
  350. steps:
  351. - name: download
  352. pull: always
  353. image: jonasfranz/crowdin
  354. settings:
  355. download: true
  356. export_dir: options/locale/
  357. ignore_branch: true
  358. project_identifier: gitea
  359. environment:
  360. CROWDIN_KEY:
  361. from_secret: crowdin_key
  362. - name: update
  363. pull: default
  364. image: alpine:3.13
  365. commands:
  366. - ./build/update-locales.sh
  367. - name: push
  368. pull: always
  369. image: appleboy/drone-git-push
  370. settings:
  371. author_email: "teabot@gitea.io"
  372. author_name: GiteaBot
  373. branch: main
  374. commit: true
  375. commit_message: "[skip ci] Updated translations via Crowdin"
  376. remote: "git@github.com:go-gitea/gitea.git"
  377. environment:
  378. GIT_PUSH_SSH_KEY:
  379. from_secret: git_push_ssh_key
  380. - name: upload_translations
  381. pull: always
  382. image: jonasfranz/crowdin
  383. settings:
  384. files:
  385. locale_en-US.ini: options/locale/locale_en-US.ini
  386. ignore_branch: true
  387. project_identifier: gitea
  388. environment:
  389. CROWDIN_KEY:
  390. from_secret: crowdin_key
  391. ---
  392. kind: pipeline
  393. name: update_gitignore_and_licenses
  394. platform:
  395. os: linux
  396. arch: arm64
  397. trigger:
  398. branch:
  399. - main
  400. event:
  401. - cron
  402. cron:
  403. - update_gitignore_and_licenses
  404. steps:
  405. - name: download
  406. image: golang:1.17
  407. commands:
  408. - timeout -s ABRT 40m make generate-license generate-gitignore
  409. - name: push
  410. pull: always
  411. image: appleboy/drone-git-push
  412. settings:
  413. author_email: "teabot@gitea.io"
  414. author_name: GiteaBot
  415. branch: main
  416. commit: true
  417. commit_message: "[skip ci] Updated licenses and gitignores "
  418. remote: "git@github.com:go-gitea/gitea.git"
  419. environment:
  420. GIT_PUSH_SSH_KEY:
  421. from_secret: git_push_ssh_key
  422. ---
  423. kind: pipeline
  424. name: release-latest
  425. platform:
  426. os: linux
  427. arch: amd64
  428. workspace:
  429. base: /source
  430. path: /
  431. trigger:
  432. branch:
  433. - main
  434. - "release/*"
  435. event:
  436. - push
  437. depends_on:
  438. - testing-amd64
  439. - testing-arm64
  440. steps:
  441. - name: fetch-tags
  442. image: docker:git
  443. commands:
  444. - git fetch --tags --force
  445. - name: static
  446. pull: always
  447. image: techknowlogick/xgo:go-1.16.x
  448. commands:
  449. - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
  450. - export PATH=$PATH:$GOPATH/bin
  451. - make release
  452. environment:
  453. GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
  454. TAGS: bindata sqlite sqlite_unlock_notify
  455. - name: gpg-sign
  456. pull: always
  457. image: plugins/gpgsign:1
  458. settings:
  459. detach_sign: true
  460. excludes:
  461. - "dist/release/*.sha256"
  462. files:
  463. - "dist/release/*"
  464. environment:
  465. GPGSIGN_KEY:
  466. from_secret: gpgsign_key
  467. GPGSIGN_PASSPHRASE:
  468. from_secret: gpgsign_passphrase
  469. - name: release-branch
  470. pull: always
  471. image: plugins/s3:1
  472. settings:
  473. acl: public-read
  474. bucket: gitea-artifacts
  475. endpoint: https://storage.gitea.io
  476. path_style: true
  477. source: "dist/release/*"
  478. strip_prefix: dist/release/
  479. target: "/gitea/${DRONE_BRANCH##release/v}"
  480. environment:
  481. AWS_ACCESS_KEY_ID:
  482. from_secret: aws_access_key_id
  483. AWS_SECRET_ACCESS_KEY:
  484. from_secret: aws_secret_access_key
  485. when:
  486. branch:
  487. - "release/*"
  488. event:
  489. - push
  490. - name: release-main
  491. image: plugins/s3:1
  492. settings:
  493. acl: public-read
  494. bucket: gitea-artifacts
  495. endpoint: https://storage.gitea.io
  496. path_style: true
  497. source: "dist/release/*"
  498. strip_prefix: dist/release/
  499. target: /gitea/main
  500. environment:
  501. AWS_ACCESS_KEY_ID:
  502. from_secret: aws_access_key_id
  503. AWS_SECRET_ACCESS_KEY:
  504. from_secret: aws_secret_access_key
  505. when:
  506. branch:
  507. - main
  508. event:
  509. - push
  510. ---
  511. kind: pipeline
  512. name: release-version
  513. platform:
  514. os: linux
  515. arch: amd64
  516. workspace:
  517. base: /source
  518. path: /
  519. trigger:
  520. event:
  521. - tag
  522. depends_on:
  523. - testing-arm64
  524. - testing-amd64
  525. steps:
  526. - name: fetch-tags
  527. pull: default
  528. image: docker:git
  529. commands:
  530. - git fetch --tags --force
  531. - name: static
  532. pull: always
  533. image: techknowlogick/xgo:go-1.16.x
  534. commands:
  535. - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
  536. - export PATH=$PATH:$GOPATH/bin
  537. - make release
  538. environment:
  539. GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
  540. TAGS: bindata sqlite sqlite_unlock_notify
  541. - name: gpg-sign
  542. pull: always
  543. image: plugins/gpgsign:1
  544. settings:
  545. detach_sign: true
  546. excludes:
  547. - "dist/release/*.sha256"
  548. files:
  549. - "dist/release/*"
  550. environment:
  551. GPGSIGN_KEY:
  552. from_secret: gpgsign_key
  553. GPGSIGN_PASSPHRASE:
  554. from_secret: gpgsign_passphrase
  555. - name: release-tag
  556. pull: always
  557. image: plugins/s3:1
  558. settings:
  559. acl: public-read
  560. bucket: gitea-artifacts
  561. endpoint: https://storage.gitea.io
  562. path_style: true
  563. source: "dist/release/*"
  564. strip_prefix: dist/release/
  565. target: "/gitea/${DRONE_TAG##v}"
  566. environment:
  567. AWS_ACCESS_KEY_ID:
  568. from_secret: aws_access_key_id
  569. AWS_SECRET_ACCESS_KEY:
  570. from_secret: aws_secret_access_key
  571. - name: github
  572. pull: always
  573. image: plugins/github-release:1
  574. settings:
  575. files:
  576. - "dist/release/*"
  577. environment:
  578. GITHUB_TOKEN:
  579. from_secret: github_token
  580. ---
  581. kind: pipeline
  582. name: docs
  583. platform:
  584. os: linux
  585. arch: arm64
  586. depends_on:
  587. - compliance
  588. trigger:
  589. event:
  590. - push
  591. - tag
  592. - pull_request
  593. steps:
  594. - name: build-docs
  595. pull: always
  596. image: plugins/hugo:latest
  597. commands:
  598. - apk add --no-cache make bash curl
  599. - cd docs
  600. - make trans-copy clean build
  601. - name: publish-docs
  602. pull: always
  603. image: techknowlogick/drone-netlify:latest
  604. settings:
  605. path: docs/public/
  606. site_id: d2260bae-7861-4c02-8646-8f6440b12672
  607. environment:
  608. NETLIFY_TOKEN:
  609. from_secret: netlify_token
  610. when:
  611. branch:
  612. - main
  613. event:
  614. - push
  615. ---
  616. kind: pipeline
  617. name: docker-linux-amd64-release-version
  618. platform:
  619. os: linux
  620. arch: amd64
  621. depends_on:
  622. - testing-amd64
  623. - testing-arm64
  624. trigger:
  625. ref:
  626. - "refs/tags/**"
  627. event:
  628. exclude:
  629. - cron
  630. steps:
  631. - name: fetch-tags
  632. image: docker:git
  633. commands:
  634. - git fetch --tags --force
  635. - name: publish
  636. pull: always
  637. image: techknowlogick/drone-docker:latest
  638. settings:
  639. auto_tag: true
  640. auto_tag_suffix: linux-amd64
  641. repo: gitea/gitea
  642. build_args:
  643. - GOPROXY=off
  644. password:
  645. from_secret: docker_password
  646. username:
  647. from_secret: docker_username
  648. when:
  649. event:
  650. exclude:
  651. - pull_request
  652. - name: publish-rootless
  653. image: techknowlogick/drone-docker:latest
  654. settings:
  655. dockerfile: Dockerfile.rootless
  656. auto_tag: true
  657. auto_tag_suffix: linux-amd64-rootless
  658. repo: gitea/gitea
  659. build_args:
  660. - GOPROXY=off
  661. password:
  662. from_secret: docker_password
  663. username:
  664. from_secret: docker_username
  665. environment:
  666. PLUGIN_MIRROR:
  667. from_secret: plugin_mirror
  668. when:
  669. event:
  670. exclude:
  671. - pull_request
  672. ---
  673. kind: pipeline
  674. name: docker-linux-amd64-release
  675. platform:
  676. os: linux
  677. arch: amd64
  678. depends_on:
  679. - testing-amd64
  680. - testing-arm64
  681. trigger:
  682. ref:
  683. - refs/heads/main
  684. event:
  685. exclude:
  686. - cron
  687. steps:
  688. - name: fetch-tags
  689. image: docker:git
  690. commands:
  691. - git fetch --tags --force
  692. - name: publish
  693. pull: always
  694. image: techknowlogick/drone-docker:latest
  695. settings:
  696. auto_tag: false
  697. tags: dev-linux-amd64
  698. repo: gitea/gitea
  699. build_args:
  700. - GOPROXY=off
  701. password:
  702. from_secret: docker_password
  703. username:
  704. from_secret: docker_username
  705. when:
  706. event:
  707. exclude:
  708. - pull_request
  709. - name: publish-rootless
  710. image: techknowlogick/drone-docker:latest
  711. settings:
  712. dockerfile: Dockerfile.rootless
  713. auto_tag: false
  714. tags: dev-linux-amd64-rootless
  715. repo: gitea/gitea
  716. build_args:
  717. - GOPROXY=off
  718. password:
  719. from_secret: docker_password
  720. username:
  721. from_secret: docker_username
  722. environment:
  723. PLUGIN_MIRROR:
  724. from_secret: plugin_mirror
  725. when:
  726. event:
  727. exclude:
  728. - pull_request
  729. ---
  730. kind: pipeline
  731. name: docker-linux-arm64-dry-run
  732. platform:
  733. os: linux
  734. arch: arm64
  735. depends_on:
  736. - compliance
  737. trigger:
  738. ref:
  739. - "refs/pull/**"
  740. steps:
  741. - name: dryrun
  742. pull: always
  743. image: techknowlogick/drone-docker:latest
  744. settings:
  745. dry_run: true
  746. repo: gitea/gitea
  747. tags: linux-arm64
  748. build_args:
  749. - GOPROXY=off
  750. environment:
  751. PLUGIN_MIRROR:
  752. from_secret: plugin_mirror
  753. when:
  754. event:
  755. - pull_request
  756. ---
  757. kind: pipeline
  758. name: docker-linux-arm64-release-version
  759. platform:
  760. os: linux
  761. arch: arm64
  762. depends_on:
  763. - testing-amd64
  764. - testing-arm64
  765. trigger:
  766. ref:
  767. - "refs/tags/**"
  768. event:
  769. exclude:
  770. - cron
  771. steps:
  772. - name: fetch-tags
  773. image: docker:git
  774. commands:
  775. - git fetch --tags --force
  776. - name: publish
  777. pull: always
  778. image: techknowlogick/drone-docker:latest
  779. settings:
  780. auto_tag: true
  781. auto_tag_suffix: linux-arm64
  782. repo: gitea/gitea
  783. build_args:
  784. - GOPROXY=off
  785. password:
  786. from_secret: docker_password
  787. username:
  788. from_secret: docker_username
  789. environment:
  790. PLUGIN_MIRROR:
  791. from_secret: plugin_mirror
  792. when:
  793. event:
  794. exclude:
  795. - pull_request
  796. - name: publish-rootless
  797. image: techknowlogick/drone-docker:latest
  798. settings:
  799. dockerfile: Dockerfile.rootless
  800. auto_tag: true
  801. auto_tag_suffix: linux-arm64-rootless
  802. repo: gitea/gitea
  803. build_args:
  804. - GOPROXY=off
  805. password:
  806. from_secret: docker_password
  807. username:
  808. from_secret: docker_username
  809. environment:
  810. PLUGIN_MIRROR:
  811. from_secret: plugin_mirror
  812. when:
  813. event:
  814. exclude:
  815. - pull_request
  816. ---
  817. kind: pipeline
  818. name: docker-linux-arm64-release
  819. platform:
  820. os: linux
  821. arch: arm64
  822. depends_on:
  823. - testing-amd64
  824. - testing-arm64
  825. trigger:
  826. ref:
  827. - refs/heads/main
  828. event:
  829. exclude:
  830. - cron
  831. steps:
  832. - name: fetch-tags
  833. image: docker:git
  834. commands:
  835. - git fetch --tags --force
  836. - name: publish
  837. pull: always
  838. image: techknowlogick/drone-docker:latest
  839. settings:
  840. auto_tag: false
  841. tags: dev-linux-arm64
  842. repo: gitea/gitea
  843. build_args:
  844. - GOPROXY=off
  845. password:
  846. from_secret: docker_password
  847. username:
  848. from_secret: docker_username
  849. environment:
  850. PLUGIN_MIRROR:
  851. from_secret: plugin_mirror
  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-arm64-rootless
  862. repo: gitea/gitea
  863. build_args:
  864. - GOPROXY=off
  865. password:
  866. from_secret: docker_password
  867. username:
  868. from_secret: docker_username
  869. environment:
  870. PLUGIN_MIRROR:
  871. from_secret: plugin_mirror
  872. when:
  873. event:
  874. exclude:
  875. - pull_request
  876. ---
  877. kind: pipeline
  878. name: docker-manifest-version
  879. platform:
  880. os: linux
  881. arch: amd64
  882. steps:
  883. - name: manifest-rootless
  884. pull: always
  885. image: plugins/manifest
  886. settings:
  887. auto_tag: true
  888. ignore_missing: true
  889. spec: docker/manifest.rootless.tmpl
  890. password:
  891. from_secret: docker_password
  892. username:
  893. from_secret: docker_username
  894. - name: manifest
  895. image: plugins/manifest
  896. settings:
  897. auto_tag: true
  898. ignore_missing: true
  899. spec: docker/manifest.tmpl
  900. password:
  901. from_secret: docker_password
  902. username:
  903. from_secret: docker_username
  904. trigger:
  905. ref:
  906. - "refs/tags/**"
  907. event:
  908. exclude:
  909. - cron
  910. depends_on:
  911. - docker-linux-amd64-release-version
  912. - docker-linux-arm64-release-version
  913. ---
  914. kind: pipeline
  915. name: docker-manifest
  916. platform:
  917. os: linux
  918. arch: amd64
  919. steps:
  920. - name: manifest-rootless
  921. pull: always
  922. image: plugins/manifest
  923. settings:
  924. auto_tag: false
  925. ignore_missing: true
  926. spec: docker/manifest.rootless.tmpl
  927. password:
  928. from_secret: docker_password
  929. username:
  930. from_secret: docker_username
  931. - name: manifest
  932. image: plugins/manifest
  933. settings:
  934. auto_tag: false
  935. ignore_missing: true
  936. spec: docker/manifest.tmpl
  937. password:
  938. from_secret: docker_password
  939. username:
  940. from_secret: docker_username
  941. trigger:
  942. ref:
  943. - refs/heads/main
  944. event:
  945. exclude:
  946. - cron
  947. depends_on:
  948. - docker-linux-amd64-release
  949. - docker-linux-arm64-release
  950. ---
  951. kind: pipeline
  952. name: notifications
  953. platform:
  954. os: linux
  955. arch: arm64
  956. clone:
  957. disable: true
  958. trigger:
  959. branch:
  960. - main
  961. - "release/*"
  962. event:
  963. - push
  964. - tag
  965. status:
  966. - success
  967. - failure
  968. depends_on:
  969. - testing-amd64
  970. - testing-arm64
  971. - release-version
  972. - release-latest
  973. - docker-linux-amd64-release
  974. - docker-linux-arm64-release
  975. - docker-linux-amd64-release-version
  976. - docker-linux-arm64-release-version
  977. - docker-manifest
  978. - docker-manifest-version
  979. - docs
  980. steps:
  981. - name: discord
  982. pull: always
  983. image: appleboy/drone-discord:1.2.4
  984. settings:
  985. 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"
  986. webhook_id:
  987. from_secret: discord_webhook_id
  988. webhook_token:
  989. from_secret: discord_webhook_token