Skip to content

Commit f5ad371

Browse files
authored
Merge branch 'master' into team_mention_tribute
2 parents 3c819a0 + e0a84d7 commit f5ad371

File tree

1,393 files changed

+155078
-57069
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,393 files changed

+155078
-57069
lines changed

.drone.yml

Lines changed: 86 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ steps:
1818
- make node_modules
1919

2020
- name: lint-frontend
21-
pull: always
2221
image: node:14
2322
commands:
2423
- make lint-frontend
@@ -34,8 +33,17 @@ steps:
3433
GOSUMDB: sum.golang.org
3534
TAGS: bindata sqlite sqlite_unlock_notify
3635

37-
- name: checks-frontend
36+
- name: lint-backend-gogit
3837
pull: always
38+
image: golang:1.15
39+
commands:
40+
- make lint-backend
41+
environment:
42+
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
43+
GOSUMDB: sum.golang.org
44+
TAGS: bindata gogit sqlite sqlite_unlock_notify
45+
46+
- name: checks-frontend
3947
image: node:14
4048
commands:
4149
- make checks-frontend
@@ -49,7 +57,6 @@ steps:
4957
depends_on: [lint-backend]
5058

5159
- name: build-frontend
52-
pull: always
5360
image: node:14
5461
commands:
5562
- make frontend
@@ -66,21 +73,19 @@ steps:
6673
depends_on: [checks-backend]
6774

6875
- name: build-backend-arm64
69-
pull: always
7076
image: golang:1.15
7177
environment:
7278
GO111MODULE: on
7379
GOPROXY: off
7480
GOOS: linux
7581
GOARCH: arm64
76-
TAGS: bindata
82+
TAGS: bindata gogit
7783
commands:
7884
- make backend # test cross compile
7985
- rm ./gitea # clean
8086
depends_on: [checks-backend]
8187

8288
- name: build-backend-386
83-
pull: always
8489
image: golang:1.15
8590
environment:
8691
GO111MODULE: on
@@ -108,33 +113,28 @@ workspace:
108113

109114
services:
110115
- name: mysql
111-
pull: default
112116
image: mysql:5.7
113117
environment:
114118
MYSQL_ALLOW_EMPTY_PASSWORD: yes
115119
MYSQL_DATABASE: test
116120

117121
- name: mysql8
118-
pull: default
119122
image: mysql:8.0
120123
environment:
121124
MYSQL_ALLOW_EMPTY_PASSWORD: yes
122125
MYSQL_DATABASE: testgitea
123126

124127
- name: mssql
125-
pull: default
126128
image: mcr.microsoft.com/mssql/server:latest
127129
environment:
128130
ACCEPT_EULA: Y
129131
MSSQL_PID: Standard
130132
SA_PASSWORD: MwantsaSecurePassword1
131133

132134
- name: ldap
133-
pull: default
134135
image: gitea/test-openldap:latest
135136

136137
- name: elasticsearch
137-
pull: default
138138
environment:
139139
discovery.type: single-node
140140
image: elasticsearch:7.5.0
@@ -149,7 +149,6 @@ services:
149149

150150
steps:
151151
- name: fetch-tags
152-
pull: default
153152
image: docker:git
154153
commands:
155154
- git fetch --tags --force
@@ -175,7 +174,6 @@ steps:
175174
- git update-ref refs/heads/tag_test ${DRONE_COMMIT_SHA}
176175

177176
- name: unit-test
178-
pull: always
179177
image: golang:1.15
180178
commands:
181179
- make unit-test-coverage test-check
@@ -185,8 +183,18 @@ steps:
185183
GITHUB_READ_TOKEN:
186184
from_secret: github_read_token
187185

188-
- name: test-mysql
186+
- name: unit-test-gogit
189187
pull: always
188+
image: golang:1.15
189+
commands:
190+
- make unit-test-coverage test-check
191+
environment:
192+
GOPROXY: off
193+
TAGS: bindata gogit sqlite sqlite_unlock_notify
194+
GITHUB_READ_TOKEN:
195+
from_secret: github_read_token
196+
197+
- name: test-mysql
190198
image: golang:1.15
191199
commands:
192200
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
@@ -202,7 +210,6 @@ steps:
202210
- build
203211

204212
- name: test-mysql8
205-
pull: always
206213
image: golang:1.15
207214
commands:
208215
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
@@ -217,7 +224,6 @@ steps:
217224
- build
218225

219226
- name: test-mssql
220-
pull: always
221227
image: golang:1.15
222228
commands:
223229
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
@@ -232,7 +238,6 @@ steps:
232238
- build
233239

234240
- name: generate-coverage
235-
pull: always
236241
image: golang:1.15
237242
commands:
238243
- make coverage
@@ -295,7 +300,6 @@ services:
295300

296301
steps:
297302
- name: fetch-tags
298-
pull: default
299303
image: docker:git
300304
commands:
301305
- git fetch --tags --force
@@ -315,29 +319,29 @@ steps:
315319
TAGS: bindata sqlite sqlite_unlock_notify
316320

317321
- name: test-sqlite
318-
pull: always
319322
image: golang:1.15
320323
commands:
321324
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
322325
- apt-get install -y git-lfs
323326
- timeout -s ABRT 40m make test-sqlite-migration test-sqlite
324327
environment:
325328
GOPROXY: off
326-
TAGS: bindata
329+
TAGS: bindata gogit sqlite sqlite_unlock_notify
330+
TEST_TAGS: gogit sqlite sqlite_unlock_notify
327331
USE_REPO_TEST_DIR: 1
328332
depends_on:
329333
- build
330334

331335
- name: test-pgsql
332-
pull: always
333336
image: golang:1.15
334337
commands:
335338
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
336339
- apt-get install -y git-lfs
337340
- timeout -s ABRT 40m make test-pgsql-migration test-pgsql
338341
environment:
339342
GOPROXY: off
340-
TAGS: bindata
343+
TAGS: bindata gogit
344+
TEST_TAGS: gogit
341345
TEST_LDAP: 1
342346
USE_REPO_TEST_DIR: 1
343347
depends_on:
@@ -431,7 +435,6 @@ depends_on:
431435

432436
steps:
433437
- name: fetch-tags
434-
pull: default
435438
image: docker:git
436439
commands:
437440
- git fetch --tags --force
@@ -485,7 +488,6 @@ steps:
485488
- push
486489

487490
- name: release-master
488-
pull: always
489491
image: plugins/s3:1
490492
settings:
491493
acl: public-read
@@ -644,7 +646,6 @@ trigger:
644646

645647
steps:
646648
- name: fetch-tags
647-
pull: default
648649
image: docker:git
649650
commands:
650651
- git fetch --tags --force
@@ -667,6 +668,27 @@ steps:
667668
exclude:
668669
- pull_request
669670

671+
- name: publish-rootless
672+
image: plugins/docker:linux-amd64
673+
settings:
674+
dockerfile: Dockerfile.rootless
675+
auto_tag: true
676+
auto_tag_suffix: linux-amd64-rootless
677+
repo: gitea/gitea
678+
build_args:
679+
- GOPROXY=off
680+
password:
681+
from_secret: docker_password
682+
username:
683+
from_secret: docker_username
684+
environment:
685+
PLUGIN_MIRROR:
686+
from_secret: plugin_mirror
687+
when:
688+
event:
689+
exclude:
690+
- pull_request
691+
670692
---
671693
kind: pipeline
672694
name: docker-linux-arm64-dry-run
@@ -696,6 +718,9 @@ steps:
696718
tags: linux-arm64
697719
build_args:
698720
- GOPROXY=off
721+
environment:
722+
PLUGIN_MIRROR:
723+
from_secret: plugin_mirror
699724
when:
700725
event:
701726
- pull_request
@@ -722,7 +747,6 @@ trigger:
722747
- "refs/tags/**"
723748
steps:
724749
- name: fetch-tags
725-
pull: default
726750
image: docker:git
727751
commands:
728752
- git fetch --tags --force
@@ -740,6 +764,30 @@ steps:
740764
from_secret: docker_password
741765
username:
742766
from_secret: docker_username
767+
environment:
768+
PLUGIN_MIRROR:
769+
from_secret: plugin_mirror
770+
when:
771+
event:
772+
exclude:
773+
- pull_request
774+
775+
- name: publish-rootless
776+
image: plugins/docker:linux-arm64
777+
settings:
778+
dockerfile: Dockerfile.rootless
779+
auto_tag: true
780+
auto_tag_suffix: linux-arm64-rootless
781+
repo: gitea/gitea
782+
build_args:
783+
- GOPROXY=off
784+
password:
785+
from_secret: docker_password
786+
username:
787+
from_secret: docker_username
788+
environment:
789+
PLUGIN_MIRROR:
790+
from_secret: plugin_mirror
743791
when:
744792
event:
745793
exclude:
@@ -754,8 +802,19 @@ platform:
754802
arch: amd64
755803

756804
steps:
757-
- name: manifest
805+
- name: manifest-rootless
758806
pull: always
807+
image: plugins/manifest
808+
settings:
809+
auto_tag: true
810+
ignore_missing: true
811+
spec: docker/manifest.rootless.tmpl
812+
password:
813+
from_secret: docker_password
814+
username:
815+
from_secret: docker_username
816+
817+
- name: manifest
759818
image: plugins/manifest
760819
settings:
761820
auto_tag: true

0 commit comments

Comments
 (0)