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

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