* update go to 1.12

* update per feedback

* fix test

* revert test changes

* remove zap.AddCallerSkip(1)
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2019-03-01 18:55:35 +01:00
коммит произвёл Jesse Hallam
родитель 7f9e1273d7
Коммит 6a3fdbd489
9 изменённых файлов: 25 добавлений и 13 удалений

Просмотреть файл

@@ -290,10 +290,13 @@ clean-docker: ## Deletes the docker containers for local development.
govet: ## Runs govet against all packages.
@echo Running GOVET
$(GO) vet -shadow $(GOFLAGS) $(TE_PACKAGES) || exit 1
$(GO) get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
$(GO) vet $(GOFLAGS) $(TE_PACKAGES) || exit 1
$(GO) vet -vettool=$(which shadow) $(GOFLAGS) $(TE_PACKAGES) || exit 1
ifeq ($(BUILD_ENTERPRISE_READY),true)
$(GO) vet $(GOFLAGS) $(EE_PACKAGES) || exit 1
$(GO) vet $(GOFLAGS) $(TE_PACKAGES) || exit 1
$(GO) vet -vettool=$(which shadow) $(GOFLAGS) $(EE_PACKAGES) || exit 1
endif
gofmt: ## Runs gofmt against all packages.

Просмотреть файл

@@ -27,10 +27,10 @@ _Note: Heroku preview does not include email or persistent storage_
## Install on Your Own Machine
- [One-line Docker Preview](http://docs.mattermost.com/install/docker-local-machine.html#one-line-docker-install)
- [One-line Docker Preview](http://docs.mattermost.com/install/docker-local-machine.html#one-line-docker-install)
- [Developer Machine Setup](https://docs.mattermost.com/developer/dev-setup.html)
- [Production Install Guides using Linux Binary](http://www.mattermost.org/installation/)
- [Production Docker Install](https://docs.mattermost.com/install/prod-docker.html)
- [Production Docker Install](https://docs.mattermost.com/install/prod-docker.html)
## Native Mobile and Desktop Apps
@@ -41,7 +41,7 @@ In addition to the web interface, you can also download Mattermost clients for [
## Get Security Bulletins
Receive notifications of critical security updates. The sophistication of online attackers is perpetually increasing. If you are deploying Mattermost it is highly recommended you subscribe to the Mattermost Security Bulletin mailing list for updates on critical security releases.
- [Subscribe here](https://about.mattermost.com/security-bulletin/)
## Get Involved
@@ -58,7 +58,7 @@ Receive notifications of critical security updates. The sophistication of online
- [API Options - webhooks, slash commands, drivers and web service](https://api.mattermost.com/)
- [See who's using Mattermost](https://about.mattermost.com/success-stories/)
- [Browse over 700 Mattermost integrations](https://about.mattermost.com/community-applications/)
- [Browse over 700 Mattermost integrations](https://about.mattermost.com/community-applications/)
## Get the Latest News

Просмотреть файл

@@ -1,3 +1,3 @@
FROM golang:1.11
FROM golang:1.12
RUN apt-get update && apt-get install -y make git apt-transport-https ca-certificates curl software-properties-common build-essential zip wget xmlsec1

Просмотреть файл

@@ -77,7 +77,7 @@ pipeline {
}
steps {
withDockerContainer(args: '-u root --privileged -v ${WORKSPACE}/src:/go/src/', image: 'mattermost/mattermost-build-server:dec-7-2018') {
withDockerContainer(args: '-u root --privileged -v ${WORKSPACE}/src:/go/src/', image: 'mattermost/mattermost-build-server:feb-28-2019') {
ansiColor('xterm') {
sh """
cd /go/src/github.com/mattermost/mattermost-server
@@ -122,7 +122,7 @@ pipeline {
}
}
withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:dec-7-2018') {
withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:feb-28-2019') {
ansiColor('xterm') {
sh """
cd /go/src/github.com/mattermost/mattermost-server

Просмотреть файл

@@ -6,3 +6,14 @@ PRs opened against the `mattermost-server` repository will use the file called `
The `Dockerfile` in this folder (`Dockerfile.buildenv`) is the build environment for our current builds you can find the docker image to downalod [here](https://hub.docker.com/r/mattermost/mattermost-build-server/tags/) or build your own.
### Docker Image for building the Server
We have a docker image to build `mattermost-server` and it is based on Go docker image.
In our Docker Hub Repository we have the following images:
- `mattermost/mattermost-build-server:dec-7-2018` which is based on Go 1.11 you can use for MM versions <= `5.9.0`
- `mattermost/mattermost-build-server:feb-28-2019` which is based on Go 1.12

Просмотреть файл

@@ -136,7 +136,7 @@ func TestLoggingAfterInitialized(t *testing.T) {
actual = strings.Join(actualRows, "\n")
}
require.Equal(t, testCase.ExpectedLogs, strings.Split(actual, "\n"))
require.ElementsMatch(t, testCase.ExpectedLogs, strings.Split(actual, "\n"))
}
})
}

Просмотреть файл

@@ -102,7 +102,6 @@ func NewLogger(config *LoggerConfiguration) *Logger {
combinedCore := zapcore.NewTee(cores...)
logger.zap = zap.New(combinedCore,
zap.AddCallerSkip(1),
zap.AddCaller(),
)

Просмотреть файл

@@ -35,7 +35,6 @@ func NewTestingLogger(tb testing.TB) *Logger {
logWriterCore := zapcore.NewCore(makeEncoder(true), logWriterSync, testingLogger.consoleLevel)
testingLogger.zap = zap.New(logWriterCore,
zap.AddCallerSkip(1),
zap.AddCaller(),
)
return testingLogger

Просмотреть файл

@@ -35,7 +35,7 @@ echo "Checking prerequisites"
REQUIREDNODEVERSION=8.9.0
REQUIREDNPMVERSION=5.6.0
REQUIREDGOVERSION=1.11.0
REQUIREDGOVERSION=1.12.0
REQUIREDDOCKERVERSION=17.0
NODEVERSION=$(sed 's/v//' <<< $(node -v))