forked from mattermost/mattermost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
761 lines (755 loc) · 28.5 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
version: 2.1
orbs:
aws-s3: circleci/[email protected]
executors:
ubuntu:
working_directory: ~/mattermost/
resource_class: 2xlarge
machine:
image: "ubuntu-2004:202201-02"
environment:
COMPOSE_PROJECT_NAME: "circleci"
ubuntu_xlarge:
working_directory: ~/mattermost/
resource_class: xlarge
machine:
image: "ubuntu-2004:202201-02"
environment:
COMPOSE_PROJECT_NAME: "circleci"
jobs:
setup-multi-product-repositories:
working_directory: /mnt/ramdisk/mattermost-server
docker:
- image: cimg/go:1.18
resource_class: large
steps:
- checkout
- run: |
cd ..
git clone --depth=1 --no-single-branch https://github.com/mattermost/focalboard.git
cd focalboard
git checkout $CIRCLE_BRANCH || git checkout main
echo $(git rev-parse HEAD)
cd ../mattermost-server
make setup-go-work
cd ../focalboard
EXCLUDE_ENTERPRISE=TRUE make templates-archive
- persist_to_workspace:
root: /mnt/ramdisk
paths:
- mattermost-server
- focalboard
setup-mattermost-webapp:
working_directory: /mnt/ramdisk/
docker:
- image: mattermost/mattermost-build-webapp:20220802_node-16.10.0@sha256:3272aa759f10c2ef1719ed08cc82ddb07224bec5be86f09800c72f5e2a623c3d
resource_class: xlarge
steps:
- run: |
git clone --depth=1 --no-single-branch https://github.com/mattermost/mattermost-webapp.git
cd mattermost-webapp
git checkout $CIRCLE_BRANCH || git checkout master
export WEBAPP_GIT_COMMIT=$(git rev-parse HEAD)
echo "$WEBAPP_GIT_COMMIT"
FILE_DIST=dist.tar.gz
curl --version
runtime="2 minute"
endtime=$(date -ud "$runtime" +%s)
while [[ $(date -u +%s) -le $endtime ]]; do
if curl -s --max-time 30 -f -o $FILE_DIST https://pr-builds.mattermost.com/mattermost-webapp/commit/$WEBAPP_GIT_COMMIT/mattermost-webapp.tar.gz; then
break
fi
echo "Waiting for webapp git commit $WEBAPP_GIT_COMMIT with sleep 5: `date +%H:%M:%S`"
sleep 5
done
if [[ -f "$FILE_DIST" ]]; then
echo "Precompiled version of web app found"
mkdir dist && tar -xf $FILE_DIST -C dist --strip-components=1
else
echo "Building web app from source"
make dist
fi
- persist_to_workspace:
root: /mnt/ramdisk
paths:
- mattermost-webapp
setup-focalboard-product:
working_directory: /mnt/ramdisk/
docker:
- image: cimg/go:1.18-node
resource_class: large
steps:
- attach_workspace:
at: /mnt/ramdisk
- run: |
cd focalboard
echo "Building Boards product for web app"
# make prebuild build-product # TODO figure out how to get this to run without bypassing the Makefile
make prebuild
cd mattermost-plugin/webapp
npm run build:product
cd ../..
- persist_to_workspace:
root: /mnt/ramdisk
paths:
- focalboard/mattermost-plugin/webapp/dist
check-app-layers:
docker:
- image: cimg/go:1.18
resource_class: medium
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
make app-layers
if [[ -n $(git status --porcelain) ]]; then echo "Please update the app layers using make app-layers"; exit 1; fi
check-go-mod-tidy:
docker:
- image: cimg/go:1.18
resource_class: medium+
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
make modules-tidy
if [[ -n $(git status --porcelain) ]]; then echo "Please tidy up the Go modules using make modules-tidy"; exit 1; fi
check-store-layers:
docker:
- image: cimg/go:1.18
resource_class: medium
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
make store-layers
if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi
check-mocks:
docker:
- image: cimg/go:1.18
resource_class: xlarge
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
make mocks
if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make mocks`"; exit 1; fi
check-email-templates:
docker:
- image: cimg/go:1.18-node
resource_class: medium+
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
sudo npm install -g [email protected]
make build-templates
if [[ -n $(git status --porcelain) ]]; then echo "Please update the email templates using `make build-templates`"; exit 1; fi
check-gen-serialized:
docker:
- image: cimg/go:1.18
resource_class: small
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
make gen-serialized
if [[ -n $(git status --porcelain) ]]; then echo "Please update the serialized files using 'make gen-serialized'"; exit 1; fi
check-migrations:
docker:
- image: cimg/go:1.18
resource_class: small
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
make migrations-extract
if [[ -n $(git status --porcelain) ]]; then echo "Please update the migrations using make migrations-extract"; exit 1; fi
# Dedicated job for golangci-lint it does not need anything only the server code for that
# and to make more clear when the job fails
check-golangci-lint:
docker:
# Keep the version in sync with the command in Makefile
- image: golangci/golangci-lint:v1.46.2
resource_class: xlarge
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
make golangci-lint
# Dedicate job for mattermost-vet to make more clear when the job fails
check-mattermost-vet:
docker:
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
resource_class: xlarge
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
export GOBIN=${PWD}/mattermost-server/bin
export PATH=$PATH:$GOBIN
cd mattermost-server
make config-reset
make plugin-checker
make vet BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}' MM_NO_ENTERPRISE_LINT=true MM_VET_OPENSPEC_PATH='${PWD}/../mattermost-api-reference/v4/html/static/mattermost-openapi-v4.yaml'
build-api-spec:
docker:
- image: cimg/node:lts
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
git clone --depth=1 --no-single-branch https://github.com/mattermost/mattermost-api-reference.git
cd mattermost-api-reference
echo "Trying to checkout the same branch on mattermost-api-reference as mattermost-server"
git checkout ${CIRCLE_BRANCH} || true
make build
build-focalboard:
docker:
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
resource_class: medium
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd focalboard
make server-linux
build-mattermost-server:
docker:
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
resource_class: xlarge
working_directory: /mnt/ramdisk
steps:
- attach_workspace:
at: /mnt/ramdisk
- run:
command: |
cd mattermost-server
make config-reset
make build-cmd BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}'
make package BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}'
- store_artifacts:
path: /mnt/ramdisk/mattermost-server/dist/mattermost-team-linux-amd64.tar.gz
- store_artifacts:
path: /mnt/ramdisk/mattermost-server/dist/mattermost-team-osx-amd64.tar.gz
- store_artifacts:
path: /mnt/ramdisk/mattermost-server/dist/mattermost-team-linux-arm64.tar.gz
- store_artifacts:
path: /mnt/ramdisk/mattermost-server/dist/mattermost-team-osx-arm64.tar.gz
- store_artifacts:
path: /mnt/ramdisk/mattermost-server/dist/mattermost-team-windows-amd64.zip
- persist_to_workspace:
root: /mnt/ramdisk
paths:
- mattermost-server/dist
upload-artifacts-to-s3:
docker:
- image: cimg/python:3.10
working_directory: /mnt/ramdisk/
steps:
- attach_workspace:
at: /mnt/ramdisk/
- run:
command: |
cd /mnt/ramdisk/mattermost-server/dist/
rm -rf mattermost
- aws-s3/copy:
from: /mnt/ramdisk/mattermost-server/dist/
to: "s3://pr-builds.mattermost.com/mattermost-server/commit/${CIRCLE_SHA1}/"
arguments: --acl public-read --cache-control "no-cache" --recursive
- aws-s3/copy:
from: /mnt/ramdisk/mattermost-server/dist/
to: s3://pr-builds.mattermost.com/mattermost-server/$(echo "${CIRCLE_BRANCH}" | sed 's/pull\//PR-/g')/
arguments: --acl public-read --cache-control "no-cache" --recursive
build-docker:
working_directory: /mnt/ramdisk/
docker:
- image: cimg/base:stable
steps:
- attach_workspace:
at: /mnt/ramdisk/
- setup_remote_docker:
version: 20.10.7
- run:
command: |
export TAG="${CIRCLE_SHA1:0:7}"
cd mattermost-server/build
export DOCKER_CLI_EXPERIMENTAL=enabled
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin
export MM_PACKAGE=https://pr-builds.mattermost.com/mattermost-server/commit/${CIRCLE_SHA1}/mattermost-team-linux-amd64.tar.gz
docker buildx build --push --build-arg MM_PACKAGE=$MM_PACKAGE -t mattermost/mm-te-test:${TAG} .
# Dedicate job for sentry it does not need anything only the server code for that
# and to make more clear when the job fails
sentry:
docker:
- image: getsentry/sentry-cli:1.64.1
working_directory: /mnt/ramdisk/
steps:
- checkout
- run:
command: apk add git
- run:
command: |
sentry-cli --log-level=debug releases new --finalize -p mattermost-server `git rev-parse HEAD`
sentry-cli --log-level=debug releases set-commits --auto `git rev-parse HEAD`
test:
executor:
name: ubuntu
parameters:
dbdriver:
type: string
dbsource:
type: string
racemode:
type: string
steps:
- attach_workspace:
at: ~/mattermost
- run:
name: Run Docker compose
command: |
cd mattermost-server/build
docker-compose --no-ansi run --rm start_dependencies
cat ../tests/test-data.ldif | docker-compose --no-ansi exec -T openldap bash -c 'ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';
docker-compose --no-ansi exec -T minio sh -c 'mkdir -p /data/mattermost-test';
docker-compose --no-ansi ps
background: true
- run:
name: Wait for docker compose
command: |
until docker network inspect circleci_mm-test; do echo "Waiting for Docker Compose Network..."; sleep 1; done;
docker run --net circleci_mm-test appropriate/curl:latest sh -c "until curl --max-time 5 --output - http://mysql:3306; do echo waiting for mysql; sleep 5; done;"
docker run --net circleci_mm-test appropriate/curl:latest sh -c "until curl --max-time 5 --output - http://elasticsearch:9200; do echo waiting for elasticsearch; sleep 5; done;"
- run:
name: Run Tests
command: |
mkdir -p mattermost-server/client/plugins
cd mattermost-server/build
docker run -it --net circleci_mm-test \
--env-file=dotenv/test.env \
--env MM_SQLSETTINGS_DATASOURCE="<<parameters.dbsource>>" \
--env MM_SQLSETTINGS_DRIVERNAME=<<parameters.dbdriver>> \
--env CIRCLECI=true \
-v ~/mattermost:/mattermost \
-w /mattermost/mattermost-server \
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
bash -c "ulimit -n 8096; make test-server<< parameters.racemode >> BUILD_NUMBER=$CIRCLE_BRANCH-$CIRCLE_PREVIOUS_BUILD_NUM TESTFLAGS= TESTFLAGSEE=" \
bash -c scripts/diff-email-templates.sh
no_output_timeout: 2h
- run:
name: Capture docker logs
when: always
command: |
cd mattermost-server/build
# Capture docker logs
mkdir -p logs
docker-compose logs --tail="all" -t --no-color > logs/docker-compose_logs
docker ps -a --no-trunc > logs/docker_ps
docker stats -a --no-stream > logs/docker_stats
tar -czvf logs/docker_logs.tar.gz logs/docker-compose_logs logs/docker_ps logs/docker_stats
- store_artifacts:
path: ~/mattermost/mattermost-server/build/logs
- run:
when: always
command: |
cd mattermost-server
mkdir -p test-results
cp report.xml test-results
- store_test_results:
path: ~/mattermost/mattermost-server/test-results/
- store_artifacts:
path: ~/mattermost/mattermost-server/test-results/
test-schema:
executor:
name: ubuntu_xlarge
steps:
- attach_workspace:
at: ~/mattermost
- run:
name: Run Docker compose
command: |
cd mattermost-server/build
docker-compose --no-ansi run --rm start_dependencies
cat ../tests/test-data.ldif | docker-compose --no-ansi exec -T openldap bash -c 'ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';
docker-compose --no-ansi exec -T minio sh -c 'mkdir -p /data/mattermost-test';
docker-compose --no-ansi ps
background: true
- run:
name: Wait for docker compose
command: |
until docker network inspect circleci_mm-test; do echo "Waiting for Docker Compose Network..."; sleep 1; done;
docker run --net circleci_mm-test appropriate/curl:latest sh -c "until curl --max-time 5 --output - http://mysql:3306; do echo waiting for mysql; sleep 5; done;"
docker run --net circleci_mm-test appropriate/curl:latest sh -c "until curl --max-time 5 --output - http://elasticsearch:9200; do echo waiting for elasticsearch; sleep 5; done;"
- run:
name: Postgres schema migration validation
command: |
cd mattermost-server/build
mkdir -p mattermost-server/client/plugins
echo "Creating databases"
docker-compose --no-ansi exec -T postgres sh -c 'exec echo "CREATE DATABASE migrated; CREATE DATABASE latest;" | exec psql -U mmuser mattermost_test'
echo "Importing postgres dump from version 6.0.0"
docker-compose --no-ansi exec -T postgres psql -U mmuser -d migrated < ../scripts/mattermost-postgresql-6.0.0.sql
docker-compose --no-ansi exec -T postgres psql -U mmuser -d migrated -c "INSERT INTO Systems (Name, Value) VALUES ('Version', '6.0.0')"
docker run -it --net circleci_mm-test \
--env-file="dotenv/test-schema-validation.env" \
--env MM_SQLSETTINGS_DATASOURCE="postgres://mmuser:mostest@postgres:5432/migrated?sslmode=disable&connect_timeout=10" \
--env MM_SQLSETTINGS_DRIVERNAME=postgres \
-v ~/mattermost:/mattermost \
-w /mattermost/mattermost-server \
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
bash -c "ulimit -n 8096; make ARGS='db migrate' run-cli && make MM_SQLSETTINGS_DATASOURCE='postgres://mmuser:mostest@postgres:5432/latest?sslmode=disable&connect_timeout=10' ARGS='db migrate' run-cli"
echo "Generating dump"
docker-compose --no-ansi exec -T postgres pg_dump --schema-only -d migrated -U mmuser > migrated.sql
docker-compose --no-ansi exec -T postgres pg_dump --schema-only -d latest -U mmuser > latest.sql
echo "Removing databases created for db comparison"
docker-compose --no-ansi exec -T postgres sh -c 'exec echo "DROP DATABASE migrated; DROP DATABASE latest;" | exec psql -U mmuser mattermost_test'
echo "Generating diff"
diff migrated.sql latest.sql > diff.txt && echo "Both schemas are same" || (echo "Schema mismatch" && cat diff.txt && exit 1)
no_output_timeout: 1h
- run:
name: MySQL schema migration validation
command: |
cd mattermost-server/build
mkdir -p mattermost-server/client/plugins
echo "Creating databases"
docker-compose --no-ansi exec -T mysql mysql -uroot -pmostest -e "CREATE DATABASE migrated; CREATE DATABASE latest; GRANT ALL PRIVILEGES ON migrated.* TO mmuser; GRANT ALL PRIVILEGES ON latest.* TO mmuser"
echo "Importing mysql dump from version 6.0.0"
docker-compose --no-ansi exec -T mysql mysql -D migrated -uroot -pmostest < ../scripts/mattermost-mysql-6.0.0.sql
docker-compose --no-ansi exec -T mysql mysql -D migrated -uroot -pmostest -e "INSERT INTO Systems (Name, Value) VALUES ('Version', '6.0.0')"
docker run -it --net circleci_mm-test \
--env-file="dotenv/test-schema-validation.env" \
--env MM_SQLSETTINGS_DATASOURCE="mmuser:mostest@tcp(mysql:3306)/migrated?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s" \
--env MM_SQLSETTINGS_DRIVERNAME=mysql \
-v ~/mattermost:/mattermost \
-w /mattermost/mattermost-server \
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
bash -c "ulimit -n 8096; make ARGS='db migrate' run-cli && make MM_SQLSETTINGS_DATASOURCE='mmuser:mostest@tcp(mysql:3306)/latest?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' ARGS='db migrate' run-cli"
echo "Generating dump"
docker-compose --no-ansi exec -T mysql mysqldump --skip-opt --no-data --compact -u root -pmostest migrated > migrated.sql
docker-compose --no-ansi exec -T mysql mysqldump --skip-opt --no-data --compact -u root -pmostest latest > latest.sql
echo "Removing databases created for db comparison"
docker-compose --no-ansi exec -T mysql mysql -uroot -pmostest -e 'DROP DATABASE migrated; DROP DATABASE latest'
echo "Generating diff"
diff migrated.sql latest.sql > diff.txt && echo "Both schemas are same" || (echo "Schema mismatch" && cat diff.txt && exit 1)
no_output_timeout: 1h
workflows:
version: 2
untagged-build:
jobs:
- setup-multi-product-repositories:
filters:
branches:
ignore:
- master
- /^release-.*/
- setup-mattermost-webapp:
filters:
branches:
ignore:
- master
- /^release-.*/
- setup-focalboard-product:
filters:
branches:
ignore:
- master
- /^release-.*/
requires:
- setup-multi-product-repositories
- check-go-mod-tidy:
requires:
- setup-multi-product-repositories
- check-golangci-lint:
requires:
- setup-multi-product-repositories
- check-app-layers:
requires:
- setup-multi-product-repositories
- check-store-layers:
requires:
- setup-multi-product-repositories
- check-mocks:
requires:
- setup-multi-product-repositories
- check-email-templates:
requires:
- setup-multi-product-repositories
- check-gen-serialized:
requires:
- setup-multi-product-repositories
- check-mattermost-vet:
requires:
- setup-multi-product-repositories
- check-migrations:
requires:
- setup-multi-product-repositories
- build-api-spec:
requires:
- setup-multi-product-repositories
- build-mattermost-server:
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- setup-mattermost-webapp
- setup-focalboard-product
- build-focalboard:
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- setup-mattermost-webapp
- test:
name: test-mysql
dbdriver: mysql
dbsource: mmuser:mostest@tcp(mysql:3306)/mattermost_test?charset=utf8mb4,utf8&multiStatements=true
racemode: ""
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- setup-mattermost-webapp
- setup-focalboard-product
- test:
name: test-postgres-normal
dbdriver: postgres
dbsource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
racemode: ""
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- setup-mattermost-webapp
- setup-focalboard-product
- test:
name: test-postgres-binary
dbdriver: postgres
dbsource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10&binary_parameters=yes
racemode: ""
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- setup-mattermost-webapp
- setup-focalboard-product
- test-schema:
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- setup-mattermost-webapp
- setup-focalboard-product
- upload-artifacts-to-s3:
context: mattermost-ci-pr-builds-s3
requires:
- build-mattermost-server
- build-focalboard
- build-docker:
context: matterbuild-docker
requires:
- upload-artifacts-to-s3
release-build:
jobs:
- setup-multi-product-repositories:
filters:
branches:
only:
- master
- /^release-.*/
- cloud
- setup-mattermost-webapp:
filters:
branches:
only:
- master
- /^release-.*/
- cloud
- setup-focalboard-product:
filters:
branches:
only:
- master
- /^release-.*/
- cloud
requires:
- setup-multi-product-repositories
- check-go-mod-tidy:
requires:
- setup-multi-product-repositories
- check-golangci-lint:
requires:
- setup-multi-product-repositories
- check-app-layers:
requires:
- setup-multi-product-repositories
- check-store-layers:
requires:
- setup-multi-product-repositories
- check-mocks:
requires:
- setup-multi-product-repositories
- check-email-templates:
requires:
- setup-multi-product-repositories
- check-gen-serialized:
requires:
- setup-multi-product-repositories
- check-mattermost-vet:
requires:
- setup-multi-product-repositories
- check-migrations:
requires:
- setup-multi-product-repositories
- build-api-spec:
requires:
- setup-multi-product-repositories
- sentry:
context: matterbuild-sentry
requires:
- setup-multi-product-repositories
- build-mattermost-server:
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- setup-mattermost-webapp
- setup-focalboard-product
- build-focalboard:
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- setup-mattermost-webapp
- test:
name: test-mysql
dbdriver: mysql
dbsource: mmuser:mostest@tcp(mysql:3306)/mattermost_test?charset=utf8mb4,utf8&multiStatements=true
racemode: "-race"
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- test:
name: test-postgres-normal
dbdriver: postgres
dbsource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
racemode: "-race"
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec
- test:
name: test-postgres-binary
dbdriver: postgres
dbsource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10&binary_parameters=yes
racemode: ""
requires:
- check-go-mod-tidy
- check-golangci-lint
- check-app-layers
- check-store-layers
- check-mocks
- check-email-templates
- check-gen-serialized
- check-mattermost-vet
- check-migrations
- build-api-spec