MM-49703: Bump Go version to 1.19 (#22107)
https://mattermost.atlassian.net/browse/MM-49703 Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
305fbb17cf
Коммит
f76d240495
@@ -212,7 +212,7 @@ jobs:
|
|||||||
check-golangci-lint:
|
check-golangci-lint:
|
||||||
docker:
|
docker:
|
||||||
# Keep the version in sync with the command in Makefile
|
# Keep the version in sync with the command in Makefile
|
||||||
- image: golangci/golangci-lint:v1.46.2
|
- image: golangci/golangci-lint:v1.50.1
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
working_directory: /mnt/ramdisk
|
working_directory: /mnt/ramdisk
|
||||||
steps:
|
steps:
|
||||||
@@ -226,7 +226,7 @@ jobs:
|
|||||||
# Dedicate job for mattermost-vet to make more clear when the job fails
|
# Dedicate job for mattermost-vet to make more clear when the job fails
|
||||||
check-mattermost-vet:
|
check-mattermost-vet:
|
||||||
docker:
|
docker:
|
||||||
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
|
- image: mattermost/mattermost-build-server:20230118_golang-1.19.5
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
working_directory: /mnt/ramdisk
|
working_directory: /mnt/ramdisk
|
||||||
steps:
|
steps:
|
||||||
@@ -256,7 +256,7 @@ jobs:
|
|||||||
make build
|
make build
|
||||||
build-focalboard:
|
build-focalboard:
|
||||||
docker:
|
docker:
|
||||||
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
|
- image: mattermost/mattermost-build-server:20230118_golang-1.19.5
|
||||||
resource_class: medium
|
resource_class: medium
|
||||||
working_directory: /mnt/ramdisk
|
working_directory: /mnt/ramdisk
|
||||||
steps:
|
steps:
|
||||||
@@ -268,7 +268,7 @@ jobs:
|
|||||||
make server-linux
|
make server-linux
|
||||||
build-mattermost-server:
|
build-mattermost-server:
|
||||||
docker:
|
docker:
|
||||||
- image: mattermost/mattermost-build-server:20220415_golang-1.18.1
|
- image: mattermost/mattermost-build-server:20230118_golang-1.19.5
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
working_directory: /mnt/ramdisk
|
working_directory: /mnt/ramdisk
|
||||||
steps:
|
steps:
|
||||||
@@ -384,7 +384,7 @@ jobs:
|
|||||||
--env CIRCLECI=true \
|
--env CIRCLECI=true \
|
||||||
-v ~/mattermost:/mattermost \
|
-v ~/mattermost:/mattermost \
|
||||||
-w /mattermost/mattermost-server \
|
-w /mattermost/mattermost-server \
|
||||||
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
|
mattermost/mattermost-build-server:20230118_golang-1.19.5 \
|
||||||
bash -c "ulimit -n 8096; make test-server<< parameters.racemode >> BUILD_NUMBER=$CIRCLE_BRANCH-$CIRCLE_PREVIOUS_BUILD_NUM TESTFLAGS= TESTFLAGSEE=" \
|
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
|
bash -c scripts/diff-email-templates.sh
|
||||||
no_output_timeout: 2h
|
no_output_timeout: 2h
|
||||||
@@ -449,7 +449,7 @@ jobs:
|
|||||||
--env MM_SQLSETTINGS_DRIVERNAME=postgres \
|
--env MM_SQLSETTINGS_DRIVERNAME=postgres \
|
||||||
-v ~/mattermost:/mattermost \
|
-v ~/mattermost:/mattermost \
|
||||||
-w /mattermost/mattermost-server \
|
-w /mattermost/mattermost-server \
|
||||||
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
|
mattermost/mattermost-build-server:20230118_golang-1.19.5 \
|
||||||
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"
|
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"
|
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 migrated -U mmuser > migrated.sql
|
||||||
@@ -475,7 +475,7 @@ jobs:
|
|||||||
--env MM_SQLSETTINGS_DRIVERNAME=mysql \
|
--env MM_SQLSETTINGS_DRIVERNAME=mysql \
|
||||||
-v ~/mattermost:/mattermost \
|
-v ~/mattermost:/mattermost \
|
||||||
-w /mattermost/mattermost-server \
|
-w /mattermost/mattermost-server \
|
||||||
mattermost/mattermost-build-server:20220415_golang-1.18.1 \
|
mattermost/mattermost-build-server:20230118_golang-1.19.5 \
|
||||||
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"
|
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"
|
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 migrated > migrated.sql
|
||||||
|
|||||||
@@ -15,18 +15,15 @@ linters-settings:
|
|||||||
linters:
|
linters:
|
||||||
disable-all: true
|
disable-all: true
|
||||||
enable:
|
enable:
|
||||||
- deadcode
|
|
||||||
- gofmt
|
- gofmt
|
||||||
- golint
|
- golint
|
||||||
- gosimple
|
- gosimple
|
||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- exportloopref
|
- exportloopref
|
||||||
- structcheck
|
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- unconvert
|
- unconvert
|
||||||
- unused
|
- unused
|
||||||
- varcheck
|
|
||||||
- misspell
|
- misspell
|
||||||
- goimports
|
- goimports
|
||||||
# TODO: enable this later
|
# TODO: enable this later
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -312,7 +312,7 @@ endif
|
|||||||
|
|
||||||
golangci-lint: ## Run golangci-lint on codebase
|
golangci-lint: ## Run golangci-lint on codebase
|
||||||
@# Keep the version in sync with the command in .circleci/config.yml
|
@# Keep the version in sync with the command in .circleci/config.yml
|
||||||
$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
|
$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
|
||||||
|
|
||||||
@echo Running golangci-lint
|
@echo Running golangci-lint
|
||||||
$(GOBIN)/golangci-lint run ./...
|
$(GOBIN)/golangci-lint run ./...
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
FROM golang:1.18.1@sha256:ee752bc53c628ff789bacefb714cff721701042ffa9eb736f7b2ed4e9f2bdab6
|
FROM golang:1.19.5@sha256:bb9811fad43a7d6fd2173248d8331b2dcf5ac9af20976b1937ecd214c5b8c383
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y make git apt-transport-https ca-certificates curl software-properties-common build-essential zip xmlsec1 jq
|
RUN apt-get update && apt-get install -y make git apt-transport-https ca-certificates curl software-properties-common build-essential zip xmlsec1 jq
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module github.com/mattermost/mattermost-server/v6
|
module github.com/mattermost/mattermost-server/v6
|
||||||
|
|
||||||
go 1.18
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
code.sajari.com/docconv v1.3.5
|
code.sajari.com/docconv v1.3.5
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if [[ $1 != "true" ]] ;
|
|||||||
then
|
then
|
||||||
echo "Creating a go.work file"
|
echo "Creating a go.work file"
|
||||||
|
|
||||||
txt="go 1.18\n\nuse ./\n"
|
txt="go 1.19\n\nuse ./\n"
|
||||||
|
|
||||||
if [ "$BUILD_ENTERPRISE_READY" == "true" ]
|
if [ "$BUILD_ENTERPRISE_READY" == "true" ]
|
||||||
then
|
then
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user