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

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