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

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