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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: compliance
  5. platform:
  6. os: linux
  7. arch: amd64
  8. trigger:
  9. event:
  10. - pull_request
  11. paths:
  12. exclude:
  13. - docs/**
  14. volumes:
  15. - name: deps
  16. temp: {}
  17. steps:
  18. - name: deps-frontend
  19. image: node:18
  20. pull: always
  21. commands:
  22. - make deps-frontend
  23. - name: deps-backend
  24. image: gitea/test_env:linux-1.20-amd64
  25. pull: always
  26. commands:
  27. - make deps-backend
  28. - make deps-tools
  29. volumes:
  30. - name: deps
  31. path: /go
  32. - name: lint-frontend
  33. image: node:18
  34. commands:
  35. - make lint-frontend
  36. depends_on: [deps-frontend]
  37. - name: lint-backend
  38. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  39. pull: always
  40. commands:
  41. - make lint-backend
  42. environment:
  43. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  44. GOSUMDB: sum.golang.org
  45. TAGS: bindata sqlite sqlite_unlock_notify
  46. depends_on: [deps-backend]
  47. volumes:
  48. - name: deps
  49. path: /go
  50. - name: lint-backend-windows
  51. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  52. commands:
  53. - make golangci-lint-windows vet
  54. environment:
  55. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  56. GOSUMDB: sum.golang.org
  57. TAGS: bindata sqlite sqlite_unlock_notify
  58. GOOS: windows
  59. GOARCH: amd64
  60. depends_on: [deps-backend]
  61. volumes:
  62. - name: deps
  63. path: /go
  64. - name: lint-backend-gogit
  65. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  66. commands:
  67. - make lint-backend
  68. environment:
  69. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  70. GOSUMDB: sum.golang.org
  71. TAGS: bindata gogit sqlite sqlite_unlock_notify
  72. depends_on: [deps-backend]
  73. volumes:
  74. - name: deps
  75. path: /go
  76. - name: checks-frontend
  77. image: node:18
  78. commands:
  79. - make checks-frontend
  80. depends_on: [deps-frontend]
  81. - name: checks-backend
  82. image: gitea/test_env:linux-1.20-amd64
  83. commands:
  84. - make --always-make checks-backend # ensure the 'go-licenses' make target runs
  85. depends_on: [deps-backend]
  86. volumes:
  87. - name: deps
  88. path: /go
  89. - name: test-frontend
  90. image: node:18
  91. commands:
  92. - make test-frontend
  93. depends_on: [lint-frontend]
  94. - name: build-frontend
  95. image: node:18
  96. commands:
  97. - make frontend
  98. depends_on: [deps-frontend]
  99. - name: build-backend-no-gcc
  100. image: gitea/test_env:linux-1.19-amd64 # this step is kept as the lowest version of golang that we support
  101. pull: always
  102. environment:
  103. GOPROXY: https://goproxy.io
  104. commands:
  105. - go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
  106. depends_on: [deps-backend, checks-backend]
  107. volumes:
  108. - name: deps
  109. path: /go
  110. - name: build-backend-arm64
  111. image: gitea/test_env:linux-1.20-amd64
  112. environment:
  113. GOPROXY: https://goproxy.io
  114. GOOS: linux
  115. GOARCH: arm64
  116. TAGS: bindata gogit
  117. commands:
  118. - make backend # test cross compile
  119. - rm ./gitea # clean
  120. depends_on: [deps-backend, checks-backend]
  121. volumes:
  122. - name: deps
  123. path: /go
  124. - name: build-backend-windows
  125. image: gitea/test_env:linux-1.20-amd64
  126. environment:
  127. GOPROXY: https://goproxy.io
  128. GOOS: windows
  129. GOARCH: amd64
  130. TAGS: bindata gogit
  131. commands:
  132. - go build -o gitea_windows
  133. depends_on: [deps-backend, checks-backend]
  134. volumes:
  135. - name: deps
  136. path: /go
  137. - name: build-backend-386
  138. image: gitea/test_env:linux-1.20-amd64
  139. environment:
  140. GOPROXY: https://goproxy.io
  141. GOOS: linux
  142. GOARCH: 386
  143. commands:
  144. - go build -o gitea_linux_386 # test if compatible with 32 bit
  145. depends_on: [deps-backend, checks-backend]
  146. volumes:
  147. - name: deps
  148. path: /go
  149. ---
  150. kind: pipeline
  151. type: docker
  152. name: testing-pgsql
  153. platform:
  154. os: linux
  155. arch: amd64
  156. depends_on:
  157. - compliance
  158. trigger:
  159. event:
  160. - pull_request
  161. paths:
  162. exclude:
  163. - docs/**
  164. volumes:
  165. - name: deps
  166. temp: {}
  167. services:
  168. - name: pgsql
  169. pull: default
  170. image: postgres:15
  171. environment:
  172. POSTGRES_DB: test
  173. POSTGRES_PASSWORD: postgres
  174. - name: ldap
  175. image: gitea/test-openldap:latest
  176. pull: always
  177. - name: minio
  178. image: minio/minio:RELEASE.2021-03-12T00-00-47Z
  179. pull: always
  180. commands:
  181. - minio server /data
  182. environment:
  183. MINIO_ACCESS_KEY: 123456
  184. MINIO_SECRET_KEY: 12345678
  185. steps:
  186. - name: fetch-tags
  187. image: docker:git
  188. pull: always
  189. commands:
  190. - git fetch --tags --force
  191. when:
  192. event:
  193. exclude:
  194. - pull_request
  195. - name: deps-backend
  196. image: gitea/test_env:linux-1.20-amd64
  197. pull: always
  198. commands:
  199. - make deps-backend
  200. volumes:
  201. - name: deps
  202. path: /go
  203. - name: prepare-test-env
  204. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  205. pull: always
  206. commands:
  207. - ./build/test-env-prepare.sh
  208. - name: build
  209. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  210. user: gitea
  211. commands:
  212. - ./build/test-env-check.sh
  213. - make backend
  214. environment:
  215. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  216. GOSUMDB: sum.golang.org
  217. TAGS: bindata
  218. depends_on: [deps-backend, prepare-test-env]
  219. volumes:
  220. - name: deps
  221. path: /go
  222. - name: test-pgsql
  223. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  224. user: gitea
  225. commands:
  226. - timeout -s ABRT 50m make test-pgsql-migration test-pgsql
  227. environment:
  228. GOPROXY: https://goproxy.io
  229. TAGS: bindata gogit
  230. RACE_ENABLED: true
  231. TEST_TAGS: gogit
  232. TEST_LDAP: 1
  233. USE_REPO_TEST_DIR: 1
  234. depends_on: [build]
  235. volumes:
  236. - name: deps
  237. path: /go
  238. ---
  239. kind: pipeline
  240. type: docker
  241. name: testing-mysql
  242. platform:
  243. os: linux
  244. arch: amd64
  245. depends_on:
  246. - compliance
  247. trigger:
  248. event:
  249. - pull_request
  250. paths:
  251. exclude:
  252. - docs/**
  253. volumes:
  254. - name: deps
  255. temp: {}
  256. services:
  257. - name: mysql
  258. image: mysql:5.7
  259. pull: always
  260. environment:
  261. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  262. MYSQL_DATABASE: test
  263. - name: elasticsearch
  264. image: elasticsearch:7.5.0
  265. pull: always
  266. environment:
  267. discovery.type: single-node
  268. - name: smtpimap
  269. image: tabascoterrier/docker-imap-devel:latest
  270. pull: always
  271. steps:
  272. - name: fetch-tags
  273. image: docker:git
  274. pull: always
  275. commands:
  276. - git fetch --tags --force
  277. when:
  278. event:
  279. exclude:
  280. - pull_request
  281. - name: deps-backend
  282. image: gitea/test_env:linux-1.20-amd64
  283. pull: always
  284. commands:
  285. - make deps-backend
  286. volumes:
  287. - name: deps
  288. path: /go
  289. - name: prepare-test-env
  290. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  291. pull: always
  292. commands:
  293. - ./build/test-env-prepare.sh
  294. - name: build
  295. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  296. user: gitea
  297. commands:
  298. - ./build/test-env-check.sh
  299. - make backend
  300. environment:
  301. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  302. GOSUMDB: sum.golang.org
  303. TAGS: bindata
  304. depends_on: [deps-backend, prepare-test-env]
  305. volumes:
  306. - name: deps
  307. path: /go
  308. - name: unit-test
  309. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  310. user: gitea
  311. commands:
  312. - make unit-test-coverage test-check
  313. environment:
  314. GOPROXY: https://goproxy.io
  315. TAGS: bindata
  316. RACE_ENABLED: true
  317. GITHUB_READ_TOKEN:
  318. from_secret: github_read_token
  319. depends_on: [deps-backend, prepare-test-env]
  320. volumes:
  321. - name: deps
  322. path: /go
  323. - name: unit-test-gogit
  324. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  325. user: gitea
  326. commands:
  327. - make unit-test-coverage test-check
  328. environment:
  329. GOPROXY: https://goproxy.io
  330. TAGS: bindata gogit
  331. RACE_ENABLED: true
  332. GITHUB_READ_TOKEN:
  333. from_secret: github_read_token
  334. depends_on: [deps-backend, prepare-test-env]
  335. volumes:
  336. - name: deps
  337. path: /go
  338. - name: test-mysql
  339. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  340. user: gitea
  341. commands:
  342. - make test-mysql-migration integration-test-coverage
  343. environment:
  344. GOPROXY: https://goproxy.io
  345. TAGS: bindata
  346. RACE_ENABLED: true
  347. USE_REPO_TEST_DIR: 1
  348. TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200"
  349. depends_on: [build]
  350. volumes:
  351. - name: deps
  352. path: /go
  353. - name: generate-coverage
  354. image: gitea/test_env:linux-1.20-amd64
  355. commands:
  356. - make coverage
  357. environment:
  358. GOPROXY: https://goproxy.io
  359. TAGS: bindata
  360. depends_on: [unit-test, test-mysql]
  361. when:
  362. branch:
  363. - main
  364. event:
  365. - push
  366. - pull_request
  367. - name: coverage-codecov
  368. image: woodpeckerci/plugin-codecov:next-alpine
  369. pull: always
  370. settings:
  371. files:
  372. - coverage.all
  373. token:
  374. from_secret: codecov_token
  375. depends_on: [generate-coverage]
  376. when:
  377. branch:
  378. - main
  379. event:
  380. - push
  381. - pull_request
  382. ---
  383. kind: pipeline
  384. type: docker
  385. name: testing-mysql8
  386. platform:
  387. os: linux
  388. arch: amd64
  389. depends_on:
  390. - compliance
  391. trigger:
  392. event:
  393. - pull_request
  394. paths:
  395. exclude:
  396. - docs/**
  397. volumes:
  398. - name: deps
  399. temp: {}
  400. services:
  401. - name: mysql8
  402. image: mysql:8
  403. pull: always
  404. environment:
  405. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  406. MYSQL_DATABASE: testgitea
  407. steps:
  408. - name: fetch-tags
  409. image: docker:git
  410. pull: always
  411. commands:
  412. - git fetch --tags --force
  413. when:
  414. event:
  415. exclude:
  416. - pull_request
  417. - name: deps-backend
  418. image: gitea/test_env:linux-1.20-amd64
  419. pull: always
  420. commands:
  421. - make deps-backend
  422. volumes:
  423. - name: deps
  424. path: /go
  425. - name: prepare-test-env
  426. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  427. pull: always
  428. commands:
  429. - ./build/test-env-prepare.sh
  430. - name: build
  431. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  432. user: gitea
  433. commands:
  434. - ./build/test-env-check.sh
  435. - make backend
  436. environment:
  437. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  438. GOSUMDB: sum.golang.org
  439. TAGS: bindata
  440. depends_on: [deps-backend, prepare-test-env]
  441. volumes:
  442. - name: deps
  443. path: /go
  444. - name: test-mysql8
  445. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  446. user: gitea
  447. commands:
  448. - timeout -s ABRT 50m make test-mysql8-migration test-mysql8
  449. environment:
  450. GOPROXY: https://goproxy.io
  451. TAGS: bindata
  452. USE_REPO_TEST_DIR: 1
  453. depends_on: [build]
  454. volumes:
  455. - name: deps
  456. path: /go
  457. ---
  458. kind: pipeline
  459. type: docker
  460. name: testing-mssql
  461. platform:
  462. os: linux
  463. arch: amd64
  464. depends_on:
  465. - compliance
  466. trigger:
  467. event:
  468. - pull_request
  469. paths:
  470. exclude:
  471. - docs/**
  472. volumes:
  473. - name: deps
  474. temp: {}
  475. services:
  476. - name: mssql
  477. image: mcr.microsoft.com/mssql/server:latest
  478. pull: always
  479. environment:
  480. ACCEPT_EULA: Y
  481. MSSQL_PID: Standard
  482. SA_PASSWORD: MwantsaSecurePassword1
  483. steps:
  484. - name: fetch-tags
  485. image: docker:git
  486. pull: always
  487. commands:
  488. - git fetch --tags --force
  489. when:
  490. event:
  491. exclude:
  492. - pull_request
  493. - name: deps-backend
  494. image: gitea/test_env:linux-1.20-amd64
  495. pull: always
  496. commands:
  497. - make deps-backend
  498. volumes:
  499. - name: deps
  500. path: /go
  501. - name: prepare-test-env
  502. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  503. pull: always
  504. commands:
  505. - ./build/test-env-prepare.sh
  506. - name: build
  507. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  508. user: gitea
  509. commands:
  510. - ./build/test-env-check.sh
  511. - make backend
  512. environment:
  513. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  514. GOSUMDB: sum.golang.org
  515. TAGS: bindata
  516. depends_on: [deps-backend, prepare-test-env]
  517. volumes:
  518. - name: deps
  519. path: /go
  520. - name: test-mssql
  521. image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
  522. user: gitea
  523. commands:
  524. - make test-mssql-migration test-mssql
  525. environment:
  526. GOPROXY: https://goproxy.io
  527. TAGS: bindata
  528. USE_REPO_TEST_DIR: 1
  529. depends_on: [build]
  530. volumes:
  531. - name: deps
  532. path: /go
  533. ---
  534. kind: pipeline
  535. name: testing-sqlite
  536. platform:
  537. os: linux
  538. arch: arm64
  539. depends_on:
  540. - compliance
  541. trigger:
  542. event:
  543. - pull_request
  544. paths:
  545. exclude:
  546. - docs/**
  547. volumes:
  548. - name: deps
  549. temp: {}
  550. steps:
  551. - name: fetch-tags
  552. image: docker:git
  553. pull: always
  554. commands:
  555. - git fetch --tags --force
  556. when:
  557. event:
  558. exclude:
  559. - pull_request
  560. - name: deps-backend
  561. image: gitea/test_env:linux-1.20-arm64
  562. pull: always
  563. commands:
  564. - make deps-backend
  565. volumes:
  566. - name: deps
  567. path: /go
  568. - name: prepare-test-env
  569. image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
  570. pull: always
  571. commands:
  572. - ./build/test-env-prepare.sh
  573. - name: build
  574. image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
  575. user: gitea
  576. commands:
  577. - ./build/test-env-check.sh
  578. - make backend
  579. environment:
  580. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  581. GOSUMDB: sum.golang.org
  582. TAGS: bindata gogit sqlite sqlite_unlock_notify
  583. depends_on: [deps-backend, prepare-test-env]
  584. volumes:
  585. - name: deps
  586. path: /go
  587. - name: test-sqlite
  588. image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
  589. user: gitea
  590. commands:
  591. - timeout -s ABRT 50m make test-sqlite-migration test-sqlite
  592. environment:
  593. GOPROXY: https://goproxy.io
  594. TAGS: bindata gogit sqlite sqlite_unlock_notify
  595. RACE_ENABLED: true
  596. TEST_TAGS: gogit sqlite sqlite_unlock_notify
  597. USE_REPO_TEST_DIR: 1
  598. depends_on: [build]
  599. volumes:
  600. - name: deps
  601. path: /go
  602. ---
  603. kind: pipeline
  604. type: docker
  605. name: testing-e2e
  606. platform:
  607. os: linux
  608. arch: amd64
  609. depends_on:
  610. - compliance
  611. trigger:
  612. event:
  613. - pull_request
  614. paths:
  615. exclude:
  616. - docs/**
  617. volumes:
  618. - name: deps
  619. temp: {}
  620. steps:
  621. - name: deps-frontend
  622. image: node:18
  623. pull: always
  624. commands:
  625. - make deps-frontend
  626. - name: build-frontend
  627. image: node:18
  628. commands:
  629. - make frontend
  630. depends_on: [deps-frontend]
  631. - name: deps-backend
  632. image: gitea/test_env:linux-1.20-amd64
  633. pull: always
  634. commands:
  635. - make deps-backend
  636. volumes:
  637. - name: deps
  638. path: /go
  639. # TODO: We should probably build all dependencies into a test image
  640. - name: test-e2e
  641. image: mcr.microsoft.com/playwright:v1.32.1-focal
  642. commands:
  643. - curl -sLO https://go.dev/dl/go1.20.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz
  644. - groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
  645. - apt-get -qq update && apt-get -qqy install build-essential
  646. - ./build/test-env-prepare.sh
  647. - su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-sqlite"
  648. environment:
  649. GOPROXY: https://goproxy.io
  650. GOSUMDB: sum.golang.org
  651. USE_REPO_TEST_DIR: 1
  652. DEBIAN_FRONTEND: noninteractive
  653. depends_on: [build-frontend, deps-backend]
  654. volumes:
  655. - name: deps
  656. path: /go
  657. ---
  658. kind: pipeline
  659. name: update_translations
  660. platform:
  661. os: linux
  662. arch: arm64
  663. trigger:
  664. branch:
  665. - main
  666. event:
  667. - cron
  668. cron:
  669. - update_translations
  670. steps:
  671. - name: download
  672. image: jonasfranz/crowdin
  673. pull: always
  674. settings:
  675. download: true
  676. export_dir: options/locale/
  677. ignore_branch: true
  678. project_identifier: gitea
  679. environment:
  680. CROWDIN_KEY:
  681. from_secret: crowdin_key
  682. - name: update
  683. image: alpine:3.17
  684. pull: always
  685. commands:
  686. - ./build/update-locales.sh
  687. - name: push
  688. image: appleboy/drone-git-push
  689. pull: always
  690. settings:
  691. author_email: "teabot@gitea.io"
  692. author_name: GiteaBot
  693. branch: main
  694. commit: true
  695. commit_message: "[skip ci] Updated translations via Crowdin"
  696. remote: "git@github.com:go-gitea/gitea.git"
  697. environment:
  698. DRONE_COMMIT_AUTHOR_EMAIL: "teabot@gitea.io"
  699. DRONE_COMMIT_AUTHOR: GiteaBot
  700. GIT_PUSH_SSH_KEY:
  701. from_secret: git_push_ssh_key
  702. - name: upload_translations
  703. image: jonasfranz/crowdin
  704. pull: always
  705. settings:
  706. files:
  707. locale_en-US.ini: options/locale/locale_en-US.ini
  708. ignore_branch: true
  709. project_identifier: gitea
  710. environment:
  711. CROWDIN_KEY:
  712. from_secret: crowdin_key
  713. ---
  714. kind: pipeline
  715. type: docker
  716. name: update_gitignore_and_licenses
  717. platform:
  718. os: linux
  719. arch: arm64
  720. trigger:
  721. branch:
  722. - main
  723. event:
  724. - cron
  725. cron:
  726. - update_gitignore_and_licenses
  727. steps:
  728. - name: download
  729. image: gitea/test_env:linux-1.20-amd64
  730. pull: always
  731. commands:
  732. - timeout -s ABRT 40m make generate-license generate-gitignore
  733. - name: push
  734. image: appleboy/drone-git-push
  735. pull: always
  736. settings:
  737. author_email: "teabot@gitea.io"
  738. author_name: "GiteaBot"
  739. branch: main
  740. commit: true
  741. commit_message: "[skip ci] Updated licenses and gitignores"
  742. remote: "git@github.com:go-gitea/gitea.git"
  743. environment:
  744. DRONE_COMMIT_AUTHOR_EMAIL: "teabot@gitea.io"
  745. DRONE_COMMIT_AUTHOR: "GiteaBot"
  746. GIT_PUSH_SSH_KEY:
  747. from_secret: git_push_ssh_key
  748. ---
  749. kind: pipeline
  750. type: docker
  751. name: release-latest
  752. platform:
  753. os: linux
  754. arch: amd64
  755. workspace:
  756. base: /source
  757. path: /
  758. trigger:
  759. branch:
  760. - main
  761. - "release/*"
  762. event:
  763. - push
  764. paths:
  765. exclude:
  766. - docs/**
  767. depends_on:
  768. - testing-mysql
  769. - testing-mysql8
  770. - testing-mssql
  771. - testing-pgsql
  772. - testing-sqlite
  773. volumes:
  774. - name: deps
  775. temp: {}
  776. steps:
  777. - name: fetch-tags
  778. image: docker:git
  779. pull: always
  780. commands:
  781. - git fetch --tags --force
  782. - name: deps-frontend
  783. image: node:18
  784. pull: always
  785. commands:
  786. - make deps-frontend
  787. - name: deps-backend
  788. image: gitea/test_env:linux-1.20-amd64
  789. pull: always
  790. commands:
  791. - make deps-backend
  792. volumes:
  793. - name: deps
  794. path: /go
  795. - name: static
  796. image: techknowlogick/xgo:go-1.20.x
  797. pull: always
  798. commands:
  799. # Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
  800. - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
  801. - export PATH=$PATH:$GOPATH/bin
  802. - make release
  803. environment:
  804. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  805. TAGS: bindata sqlite sqlite_unlock_notify
  806. DEBIAN_FRONTEND: noninteractive
  807. volumes:
  808. - name: deps
  809. path: /go
  810. - name: gpg-sign
  811. image: plugins/gpgsign:1
  812. pull: always
  813. settings:
  814. detach_sign: true
  815. excludes:
  816. - "dist/release/*.sha256"
  817. files:
  818. - "dist/release/*"
  819. environment:
  820. GPGSIGN_KEY:
  821. from_secret: gpgsign_key
  822. GPGSIGN_PASSPHRASE:
  823. from_secret: gpgsign_passphrase
  824. - name: release-branch
  825. image: woodpeckerci/plugin-s3:latest
  826. pull: always
  827. settings:
  828. acl:
  829. from_secret: aws_s3_acl
  830. region:
  831. from_secret: aws_s3_region
  832. bucket:
  833. from_secret: aws_s3_bucket
  834. endpoint:
  835. from_secret: aws_s3_endpoint
  836. path_style:
  837. from_secret: aws_s3_path_style
  838. source: "dist/release/*"
  839. strip_prefix: dist/release/
  840. target: "/gitea/${DRONE_BRANCH##release/v}"
  841. environment:
  842. AWS_ACCESS_KEY_ID:
  843. from_secret: aws_access_key_id
  844. AWS_SECRET_ACCESS_KEY:
  845. from_secret: aws_secret_access_key
  846. when:
  847. branch:
  848. - "release/*"
  849. event:
  850. - push
  851. - name: release-main
  852. image: woodpeckerci/plugin-s3:latest
  853. settings:
  854. acl:
  855. from_secret: aws_s3_acl
  856. region:
  857. from_secret: aws_s3_region
  858. bucket:
  859. from_secret: aws_s3_bucket
  860. endpoint:
  861. from_secret: aws_s3_endpoint
  862. path_style:
  863. from_secret: aws_s3_path_style
  864. source: "dist/release/*"
  865. strip_prefix: dist/release/
  866. target: /gitea/main
  867. environment:
  868. AWS_ACCESS_KEY_ID:
  869. from_secret: aws_access_key_id
  870. AWS_SECRET_ACCESS_KEY:
  871. from_secret: aws_secret_access_key
  872. when:
  873. branch:
  874. - main
  875. event:
  876. - push
  877. ---
  878. kind: pipeline
  879. name: release-version
  880. platform:
  881. os: linux
  882. arch: amd64
  883. workspace:
  884. base: /source
  885. path: /
  886. trigger:
  887. event:
  888. - tag
  889. depends_on:
  890. - testing-mysql
  891. - testing-mysql8
  892. - testing-mssql
  893. - testing-pgsql
  894. - testing-sqlite
  895. volumes:
  896. - name: deps
  897. temp: {}
  898. steps:
  899. - name: fetch-tags
  900. image: docker:git
  901. pull: always
  902. commands:
  903. - git fetch --tags --force
  904. - name: deps-frontend
  905. image: node:18
  906. pull: always
  907. commands:
  908. - make deps-frontend
  909. - name: deps-backend
  910. image: gitea/test_env:linux-1.20-amd64
  911. pull: always
  912. commands:
  913. - make deps-backend
  914. volumes:
  915. - name: deps
  916. path: /go
  917. - name: static
  918. image: techknowlogick/xgo:go-1.20.x
  919. pull: always
  920. commands:
  921. # Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
  922. - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
  923. - export PATH=$PATH:$GOPATH/bin
  924. - make release
  925. environment:
  926. GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
  927. TAGS: bindata sqlite sqlite_unlock_notify
  928. DEBIAN_FRONTEND: noninteractive
  929. depends_on: [fetch-tags]
  930. volumes:
  931. - name: deps
  932. path: /go
  933. - name: gpg-sign
  934. image: plugins/gpgsign:1
  935. pull: always
  936. settings:
  937. detach_sign: true
  938. excludes:
  939. - "dist/release/*.sha256"
  940. files:
  941. - "dist/release/*"
  942. environment:
  943. GPGSIGN_KEY:
  944. from_secret: gpgsign_key
  945. GPGSIGN_PASSPHRASE:
  946. from_secret: gpgsign_passphrase
  947. depends_on: [static]
  948. - name: release-tag
  949. image: woodpeckerci/plugin-s3:latest
  950. pull: always
  951. settings:
  952. acl:
  953. from_secret: aws_s3_acl
  954. region:
  955. from_secret: aws_s3_region
  956. bucket:
  957. from_secret: aws_s3_bucket
  958. endpoint:
  959. from_secret: aws_s3_endpoint
  960. path_style:
  961. from_secret: aws_s3_path_style
  962. source: "dist/release/*"
  963. strip_prefix: dist/release/
  964. target: "/gitea/${DRONE_TAG##v}"
  965. environment:
  966. AWS_ACCESS_KEY_ID:
  967. from_secret: aws_access_key_id
  968. AWS_SECRET_ACCESS_KEY:
  969. from_secret: aws_secret_access_key
  970. depends_on: [gpg-sign]
  971. - name: github
  972. image: plugins/github-release:latest
  973. pull: always
  974. settings:
  975. files:
  976. - "dist/release/*"
  977. file_exists: overwrite
  978. environment:
  979. GITHUB_TOKEN:
  980. from_secret: github_token
  981. depends_on: [gpg-sign]
  982. ---
  983. kind: pipeline
  984. type: docker
  985. name: docs
  986. platform:
  987. os: linux
  988. arch: arm64
  989. depends_on:
  990. - compliance
  991. trigger:
  992. event:
  993. - push
  994. - tag
  995. - pull_request
  996. paths:
  997. include:
  998. - docs/**
  999. steps:
  1000. - name: build-docs
  1001. image: gitea/test_env:linux-1.20-arm64
  1002. commands:
  1003. - cd docs
  1004. - make trans-copy clean build
  1005. - name: publish-docs
  1006. image: techknowlogick/drone-netlify:latest
  1007. pull: always
  1008. settings:
  1009. path: docs/public/
  1010. site_id: d2260bae-7861-4c02-8646-8f6440b12672
  1011. environment:
  1012. NETLIFY_TOKEN:
  1013. from_secret: netlify_token
  1014. when:
  1015. branch:
  1016. - main
  1017. event:
  1018. - push
  1019. ---
  1020. kind: pipeline
  1021. type: docker
  1022. name: docker-linux-amd64-release-version
  1023. platform:
  1024. os: linux
  1025. arch: amd64
  1026. depends_on:
  1027. - testing-mysql
  1028. - testing-mysql8
  1029. - testing-mssql
  1030. - testing-pgsql
  1031. - testing-sqlite
  1032. trigger:
  1033. ref:
  1034. include:
  1035. - "refs/tags/**"
  1036. exclude:
  1037. - "refs/tags/**-rc*"
  1038. event:
  1039. exclude:
  1040. - cron
  1041. paths:
  1042. exclude:
  1043. - docs/**
  1044. steps:
  1045. - name: fetch-tags
  1046. image: docker:git
  1047. pull: always
  1048. commands:
  1049. - git fetch --tags --force
  1050. - name: publish
  1051. image: plugins/docker:latest
  1052. pull: always
  1053. settings:
  1054. auto_tag: true
  1055. auto_tag_suffix: linux-amd64
  1056. repo: gitea/gitea
  1057. build_args:
  1058. - GOPROXY=https://goproxy.io
  1059. password:
  1060. from_secret: docker_password
  1061. username:
  1062. from_secret: docker_username
  1063. environment:
  1064. PLUGIN_MIRROR:
  1065. from_secret: plugin_mirror
  1066. DOCKER_BUILDKIT: 1
  1067. when:
  1068. event:
  1069. exclude:
  1070. - pull_request
  1071. - name: publish-rootless
  1072. image: plugins/docker:latest
  1073. settings:
  1074. dockerfile: Dockerfile.rootless
  1075. auto_tag: true
  1076. auto_tag_suffix: linux-amd64-rootless
  1077. repo: gitea/gitea
  1078. build_args:
  1079. - GOPROXY=https://goproxy.io
  1080. password:
  1081. from_secret: docker_password
  1082. username:
  1083. from_secret: docker_username
  1084. environment:
  1085. PLUGIN_MIRROR:
  1086. from_secret: plugin_mirror
  1087. DOCKER_BUILDKIT: 1
  1088. when:
  1089. event:
  1090. exclude:
  1091. - pull_request
  1092. ---
  1093. kind: pipeline
  1094. type: docker
  1095. name: docker-linux-amd64-release-candidate-version
  1096. platform:
  1097. os: linux
  1098. arch: amd64
  1099. depends_on:
  1100. - testing-mysql
  1101. - testing-mysql8
  1102. - testing-mssql
  1103. - testing-pgsql
  1104. - testing-sqlite
  1105. trigger:
  1106. ref:
  1107. - "refs/tags/**-rc*"
  1108. event:
  1109. exclude:
  1110. - cron
  1111. paths:
  1112. exclude:
  1113. - docs/**
  1114. steps:
  1115. - name: fetch-tags
  1116. image: docker:git
  1117. pull: always
  1118. commands:
  1119. - git fetch --tags --force
  1120. - name: publish
  1121. image: plugins/docker:latest
  1122. pull: always
  1123. settings:
  1124. tags: ${DRONE_TAG##v}-linux-amd64
  1125. repo: gitea/gitea
  1126. build_args:
  1127. - GOPROXY=https://goproxy.io
  1128. password:
  1129. from_secret: docker_password
  1130. username:
  1131. from_secret: docker_username
  1132. environment:
  1133. PLUGIN_MIRROR:
  1134. from_secret: plugin_mirror
  1135. DOCKER_BUILDKIT: 1
  1136. when:
  1137. event:
  1138. exclude:
  1139. - pull_request
  1140. - name: publish-rootless
  1141. image: plugins/docker:latest
  1142. settings:
  1143. dockerfile: Dockerfile.rootless
  1144. tags: ${DRONE_TAG##v}-linux-amd64-rootless
  1145. repo: gitea/gitea
  1146. build_args:
  1147. - GOPROXY=https://goproxy.io
  1148. password:
  1149. from_secret: docker_password
  1150. username:
  1151. from_secret: docker_username
  1152. environment:
  1153. PLUGIN_MIRROR:
  1154. from_secret: plugin_mirror
  1155. DOCKER_BUILDKIT: 1
  1156. when:
  1157. event:
  1158. exclude:
  1159. - pull_request
  1160. ---
  1161. kind: pipeline
  1162. type: docker
  1163. name: docker-linux-amd64-release
  1164. platform:
  1165. os: linux
  1166. arch: amd64
  1167. depends_on:
  1168. - testing-mysql
  1169. - testing-mysql8
  1170. - testing-mssql
  1171. - testing-pgsql
  1172. - testing-sqlite
  1173. trigger:
  1174. ref:
  1175. - refs/heads/main
  1176. event:
  1177. exclude:
  1178. - cron
  1179. steps:
  1180. - name: fetch-tags
  1181. image: docker:git
  1182. pull: always
  1183. commands:
  1184. - git fetch --tags --force
  1185. - name: publish
  1186. image: plugins/docker:latest
  1187. pull: always
  1188. settings:
  1189. auto_tag: false
  1190. tags: dev-linux-amd64
  1191. repo: gitea/gitea
  1192. build_args:
  1193. - GOPROXY=https://goproxy.io
  1194. password:
  1195. from_secret: docker_password
  1196. username:
  1197. from_secret: docker_username
  1198. environment:
  1199. PLUGIN_MIRROR:
  1200. from_secret: plugin_mirror
  1201. DOCKER_BUILDKIT: 1
  1202. when:
  1203. event:
  1204. exclude:
  1205. - pull_request
  1206. - name: publish-rootless
  1207. image: plugins/docker:latest
  1208. settings:
  1209. dockerfile: Dockerfile.rootless
  1210. auto_tag: false
  1211. tags: dev-linux-amd64-rootless
  1212. repo: gitea/gitea
  1213. build_args:
  1214. - GOPROXY=https://goproxy.io
  1215. password:
  1216. from_secret: docker_password
  1217. username:
  1218. from_secret: docker_username
  1219. environment:
  1220. PLUGIN_MIRROR:
  1221. from_secret: plugin_mirror
  1222. DOCKER_BUILDKIT: 1
  1223. when:
  1224. event:
  1225. exclude:
  1226. - pull_request
  1227. ---
  1228. kind: pipeline
  1229. name: docker-linux-amd64-release-branch
  1230. platform:
  1231. os: linux
  1232. arch: amd64
  1233. depends_on:
  1234. - testing-mysql
  1235. - testing-mysql8
  1236. - testing-mssql
  1237. - testing-pgsql
  1238. - testing-sqlite
  1239. trigger:
  1240. ref:
  1241. - "refs/heads/release/v*"
  1242. event:
  1243. exclude:
  1244. - cron
  1245. steps:
  1246. - name: fetch-tags
  1247. image: docker:git
  1248. pull: always
  1249. commands:
  1250. - git fetch --tags --force
  1251. - name: publish
  1252. image: plugins/docker:latest
  1253. pull: always
  1254. settings:
  1255. auto_tag: false
  1256. tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64
  1257. repo: gitea/gitea
  1258. build_args:
  1259. - GOPROXY=https://goproxy.io
  1260. password:
  1261. from_secret: docker_password
  1262. username:
  1263. from_secret: docker_username
  1264. environment:
  1265. PLUGIN_MIRROR:
  1266. from_secret: plugin_mirror
  1267. DOCKER_BUILDKIT: 1
  1268. when:
  1269. event:
  1270. exclude:
  1271. - pull_request
  1272. - name: publish-rootless
  1273. image: plugins/docker:latest
  1274. settings:
  1275. dockerfile: Dockerfile.rootless
  1276. auto_tag: false
  1277. tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64-rootless
  1278. repo: gitea/gitea
  1279. build_args:
  1280. - GOPROXY=https://goproxy.io
  1281. password:
  1282. from_secret: docker_password
  1283. username:
  1284. from_secret: docker_username
  1285. environment:
  1286. PLUGIN_MIRROR:
  1287. from_secret: plugin_mirror
  1288. DOCKER_BUILDKIT: 1
  1289. when:
  1290. event:
  1291. exclude:
  1292. - pull_request
  1293. ---
  1294. kind: pipeline
  1295. type: docker
  1296. name: docker-linux-arm64-dry-run
  1297. platform:
  1298. os: linux
  1299. arch: arm64
  1300. depends_on:
  1301. - compliance
  1302. trigger:
  1303. event:
  1304. - pull_request
  1305. paths:
  1306. exclude:
  1307. - docs/**
  1308. steps:
  1309. - name: dryrun
  1310. image: plugins/docker:latest
  1311. pull: always
  1312. settings:
  1313. dry_run: true
  1314. repo: gitea/gitea
  1315. tags: linux-arm64
  1316. build_args:
  1317. - GOPROXY=https://goproxy.io
  1318. environment:
  1319. PLUGIN_MIRROR:
  1320. from_secret: plugin_mirror
  1321. DOCKER_BUILDKIT: 1
  1322. when:
  1323. event:
  1324. - pull_request
  1325. ---
  1326. kind: pipeline
  1327. type: docker
  1328. name: docker-linux-arm64-release-version
  1329. platform:
  1330. os: linux
  1331. arch: arm64
  1332. depends_on:
  1333. - testing-mysql
  1334. - testing-mysql8
  1335. - testing-mssql
  1336. - testing-pgsql
  1337. - testing-sqlite
  1338. trigger:
  1339. ref:
  1340. include:
  1341. - "refs/tags/**"
  1342. exclude:
  1343. - "refs/tags/**-rc*"
  1344. event:
  1345. exclude:
  1346. - cron
  1347. paths:
  1348. exclude:
  1349. - docs/**
  1350. steps:
  1351. - name: fetch-tags
  1352. image: docker:git
  1353. pull: always
  1354. commands:
  1355. - git fetch --tags --force
  1356. - name: publish
  1357. image: plugins/docker:latest
  1358. pull: always
  1359. settings:
  1360. auto_tag: true
  1361. auto_tag_suffix: linux-arm64
  1362. repo: gitea/gitea
  1363. build_args:
  1364. - GOPROXY=https://goproxy.io
  1365. password:
  1366. from_secret: docker_password
  1367. username:
  1368. from_secret: docker_username
  1369. environment:
  1370. PLUGIN_MIRROR:
  1371. from_secret: plugin_mirror
  1372. DOCKER_BUILDKIT: 1
  1373. when:
  1374. event:
  1375. exclude:
  1376. - pull_request
  1377. - name: publish-rootless
  1378. image: plugins/docker:latest
  1379. settings:
  1380. dockerfile: Dockerfile.rootless
  1381. auto_tag: true
  1382. auto_tag_suffix: linux-arm64-rootless
  1383. repo: gitea/gitea
  1384. build_args:
  1385. - GOPROXY=https://goproxy.io
  1386. password:
  1387. from_secret: docker_password
  1388. username:
  1389. from_secret: docker_username
  1390. environment:
  1391. PLUGIN_MIRROR:
  1392. from_secret: plugin_mirror
  1393. DOCKER_BUILDKIT: 1
  1394. when:
  1395. event:
  1396. exclude:
  1397. - pull_request
  1398. ---
  1399. kind: pipeline
  1400. type: docker
  1401. name: docker-linux-arm64-release-candidate-version
  1402. platform:
  1403. os: linux
  1404. arch: arm64
  1405. depends_on:
  1406. - testing-mysql
  1407. - testing-mysql8
  1408. - testing-mssql
  1409. - testing-pgsql
  1410. - testing-sqlite
  1411. trigger:
  1412. ref:
  1413. - "refs/tags/**-rc*"
  1414. event:
  1415. exclude:
  1416. - cron
  1417. paths:
  1418. exclude:
  1419. - docs/**
  1420. steps:
  1421. - name: fetch-tags
  1422. image: docker:git
  1423. pull: always
  1424. commands:
  1425. - git fetch --tags --force
  1426. - name: publish
  1427. image: plugins/docker:latest
  1428. pull: always
  1429. settings:
  1430. tags: ${DRONE_TAG##v}-linux-arm64
  1431. repo: gitea/gitea
  1432. build_args:
  1433. - GOPROXY=https://goproxy.io
  1434. password:
  1435. from_secret: docker_password
  1436. username:
  1437. from_secret: docker_username
  1438. environment:
  1439. PLUGIN_MIRROR:
  1440. from_secret: plugin_mirror
  1441. DOCKER_BUILDKIT: 1
  1442. when:
  1443. event:
  1444. exclude:
  1445. - pull_request
  1446. - name: publish-rootless
  1447. image: plugins/docker:latest
  1448. settings:
  1449. dockerfile: Dockerfile.rootless
  1450. tags: ${DRONE_TAG##v}-linux-arm64-rootless
  1451. repo: gitea/gitea
  1452. build_args:
  1453. - GOPROXY=https://goproxy.io
  1454. password:
  1455. from_secret: docker_password
  1456. username:
  1457. from_secret: docker_username
  1458. environment:
  1459. PLUGIN_MIRROR:
  1460. from_secret: plugin_mirror
  1461. DOCKER_BUILDKIT: 1
  1462. when:
  1463. event:
  1464. exclude:
  1465. - pull_request
  1466. ---
  1467. kind: pipeline
  1468. type: docker
  1469. name: docker-linux-arm64-release
  1470. platform:
  1471. os: linux
  1472. arch: arm64
  1473. depends_on:
  1474. - testing-mysql
  1475. - testing-mysql8
  1476. - testing-mssql
  1477. - testing-pgsql
  1478. - testing-sqlite
  1479. trigger:
  1480. ref:
  1481. - refs/heads/main
  1482. event:
  1483. exclude:
  1484. - cron
  1485. paths:
  1486. exclude:
  1487. - docs/**
  1488. steps:
  1489. - name: fetch-tags
  1490. image: docker:git
  1491. pull: always
  1492. commands:
  1493. - git fetch --tags --force
  1494. - name: publish
  1495. image: plugins/docker:latest
  1496. pull: always
  1497. settings:
  1498. auto_tag: false
  1499. tags: dev-linux-arm64
  1500. repo: gitea/gitea
  1501. build_args:
  1502. - GOPROXY=https://goproxy.io
  1503. password:
  1504. from_secret: docker_password
  1505. username:
  1506. from_secret: docker_username
  1507. environment:
  1508. PLUGIN_MIRROR:
  1509. from_secret: plugin_mirror
  1510. DOCKER_BUILDKIT: 1
  1511. when:
  1512. event:
  1513. exclude:
  1514. - pull_request
  1515. - name: publish-rootless
  1516. image: plugins/docker:latest
  1517. settings:
  1518. dockerfile: Dockerfile.rootless
  1519. auto_tag: false
  1520. tags: dev-linux-arm64-rootless
  1521. repo: gitea/gitea
  1522. build_args:
  1523. - GOPROXY=https://goproxy.io
  1524. password:
  1525. from_secret: docker_password
  1526. username:
  1527. from_secret: docker_username
  1528. environment:
  1529. PLUGIN_MIRROR:
  1530. from_secret: plugin_mirror
  1531. DOCKER_BUILDKIT: 1
  1532. when:
  1533. event:
  1534. exclude:
  1535. - pull_request
  1536. ---
  1537. kind: pipeline
  1538. name: docker-linux-arm64-release-branch
  1539. platform:
  1540. os: linux
  1541. arch: arm64
  1542. depends_on:
  1543. - testing-mysql
  1544. - testing-mysql8
  1545. - testing-mssql
  1546. - testing-pgsql
  1547. - testing-sqlite
  1548. trigger:
  1549. ref:
  1550. - "refs/heads/release/v*"
  1551. event:
  1552. exclude:
  1553. - cron
  1554. steps:
  1555. - name: fetch-tags
  1556. image: docker:git
  1557. pull: always
  1558. commands:
  1559. - git fetch --tags --force
  1560. - name: publish
  1561. image: plugins/docker:latest
  1562. pull: always
  1563. settings:
  1564. auto_tag: false
  1565. tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64
  1566. repo: gitea/gitea
  1567. build_args:
  1568. - GOPROXY=https://goproxy.io
  1569. password:
  1570. from_secret: docker_password
  1571. username:
  1572. from_secret: docker_username
  1573. environment:
  1574. PLUGIN_MIRROR:
  1575. from_secret: plugin_mirror
  1576. DOCKER_BUILDKIT: 1
  1577. when:
  1578. event:
  1579. exclude:
  1580. - pull_request
  1581. - name: publish-rootless
  1582. image: plugins/docker:latest
  1583. settings:
  1584. dockerfile: Dockerfile.rootless
  1585. auto_tag: false
  1586. tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64-rootless
  1587. repo: gitea/gitea
  1588. build_args:
  1589. - GOPROXY=https://goproxy.io
  1590. password:
  1591. from_secret: docker_password
  1592. username:
  1593. from_secret: docker_username
  1594. environment:
  1595. PLUGIN_MIRROR:
  1596. from_secret: plugin_mirror
  1597. DOCKER_BUILDKIT: 1
  1598. when:
  1599. event:
  1600. exclude:
  1601. - pull_request
  1602. ---
  1603. kind: pipeline
  1604. type: docker
  1605. name: docker-manifest-version
  1606. platform:
  1607. os: linux
  1608. arch: amd64
  1609. steps:
  1610. - name: manifest-rootless
  1611. image: plugins/manifest
  1612. pull: always
  1613. settings:
  1614. auto_tag: true
  1615. ignore_missing: true
  1616. spec: docker/manifest.rootless.tmpl
  1617. password:
  1618. from_secret: docker_password
  1619. username:
  1620. from_secret: docker_username
  1621. - name: manifest
  1622. image: plugins/manifest
  1623. settings:
  1624. auto_tag: true
  1625. ignore_missing: true
  1626. spec: docker/manifest.tmpl
  1627. password:
  1628. from_secret: docker_password
  1629. username:
  1630. from_secret: docker_username
  1631. trigger:
  1632. ref:
  1633. - "refs/tags/**"
  1634. event:
  1635. exclude:
  1636. - cron
  1637. paths:
  1638. exclude:
  1639. - docs/**
  1640. depends_on:
  1641. - docker-linux-amd64-release-version
  1642. - docker-linux-amd64-release-candidate-version
  1643. - docker-linux-arm64-release-version
  1644. - docker-linux-arm64-release-candidate-version
  1645. ---
  1646. kind: pipeline
  1647. type: docker
  1648. name: docker-manifest
  1649. platform:
  1650. os: linux
  1651. arch: amd64
  1652. steps:
  1653. - name: manifest-rootless
  1654. image: plugins/manifest
  1655. pull: always
  1656. settings:
  1657. auto_tag: false
  1658. ignore_missing: true
  1659. spec: docker/manifest.rootless.tmpl
  1660. password:
  1661. from_secret: docker_password
  1662. username:
  1663. from_secret: docker_username
  1664. - name: manifest
  1665. image: plugins/manifest
  1666. settings:
  1667. auto_tag: false
  1668. ignore_missing: true
  1669. spec: docker/manifest.tmpl
  1670. password:
  1671. from_secret: docker_password
  1672. username:
  1673. from_secret: docker_username
  1674. trigger:
  1675. ref:
  1676. - refs/heads/main
  1677. - "refs/heads/release/v*"
  1678. event:
  1679. exclude:
  1680. - cron
  1681. paths:
  1682. exclude:
  1683. - docs/**
  1684. depends_on:
  1685. - docker-linux-amd64-release
  1686. - docker-linux-arm64-release
  1687. - docker-linux-amd64-release-branch
  1688. - docker-linux-arm64-release-branch
  1689. ---
  1690. kind: pipeline
  1691. type: docker
  1692. name: notifications
  1693. platform:
  1694. os: linux
  1695. arch: arm64
  1696. clone:
  1697. disable: true
  1698. trigger:
  1699. branch:
  1700. - main
  1701. - "release/*"
  1702. event:
  1703. - push
  1704. - tag
  1705. status:
  1706. - success
  1707. - failure
  1708. depends_on:
  1709. - testing-mysql
  1710. - testing-mysql8
  1711. - testing-mssql
  1712. - testing-pgsql
  1713. - testing-sqlite
  1714. - release-version
  1715. - release-latest
  1716. - docker-linux-amd64-release
  1717. - docker-linux-arm64-release
  1718. - docker-linux-amd64-release-version
  1719. - docker-linux-arm64-release-version
  1720. - docker-linux-amd64-release-candidate-version
  1721. - docker-linux-arm64-release-candidate-version
  1722. - docker-linux-amd64-release-branch
  1723. - docker-linux-arm64-release-branch
  1724. - docker-manifest
  1725. - docker-manifest-version
  1726. - docs
  1727. steps:
  1728. - name: discord
  1729. image: appleboy/drone-discord:1.2.4
  1730. pull: always
  1731. settings:
  1732. 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"
  1733. webhook_id:
  1734. from_secret: discord_webhook_id
  1735. webhook_token:
  1736. from_secret: discord_webhook_token