update build image to go 1.13 (#12833)
* update build image to go 1.13 * Define TLS Max Version for Clients since TLS1.3 does not allow cipher suites to be configured
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
43161731fa
Коммит
709f407d33
@@ -56,7 +56,7 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: mattermost/mattermost-build-server:sep-17-2019
|
- image: mattermost/mattermost-build-server:oct-18-2019
|
||||||
working_directory: /go/src/github.com/mattermost
|
working_directory: /go/src/github.com/mattermost
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
@@ -123,7 +123,7 @@ jobs:
|
|||||||
--env MM_ELASTICSEARCHSETTINGS_CONNECTIONURL=http://elasticsearch:9200 \
|
--env MM_ELASTICSEARCHSETTINGS_CONNECTIONURL=http://elasticsearch:9200 \
|
||||||
-v ~/go/src:/go/src \
|
-v ~/go/src:/go/src \
|
||||||
-w /go/src/github.com/mattermost/mattermost-server \
|
-w /go/src/github.com/mattermost/mattermost-server \
|
||||||
mattermost/mattermost-build-server:sep-17-2019 \
|
mattermost/mattermost-build-server:oct-18-2019 \
|
||||||
bash -c 'ulimit -n 8096; make test-server BUILD_NUMBER="$CIRCLE_BRANCH-$CIRCLE_PREVIOUS_BUILD_NUM" TESTFLAGS= TESTFLAGSEE='
|
bash -c 'ulimit -n 8096; make test-server BUILD_NUMBER="$CIRCLE_BRANCH-$CIRCLE_PREVIOUS_BUILD_NUM" TESTFLAGS= TESTFLAGSEE='
|
||||||
no_output_timeout: 1h
|
no_output_timeout: 1h
|
||||||
- run:
|
- run:
|
||||||
@@ -196,7 +196,7 @@ jobs:
|
|||||||
--env MM_ELASTICSEARCHSETTINGS_CONNECTIONURL=http://elasticsearch:9200 \
|
--env MM_ELASTICSEARCHSETTINGS_CONNECTIONURL=http://elasticsearch:9200 \
|
||||||
-v ~/go/src:/go/src \
|
-v ~/go/src:/go/src \
|
||||||
-w /go/src/github.com/mattermost/mattermost-server \
|
-w /go/src/github.com/mattermost/mattermost-server \
|
||||||
mattermost/mattermost-build-server:feb-28-2019 \
|
mattermost/mattermost-build-server:oct-18-2019 \
|
||||||
bash -c 'ulimit -n 8096; make ARGS="version" run-cli && make MM_SQLSETTINGS_DATASOURCE="postgres://mmuser:mostest@postgres:5432/latest?sslmode=disable&connect_timeout=10" ARGS="version" run-cli'
|
bash -c 'ulimit -n 8096; make ARGS="version" run-cli && make MM_SQLSETTINGS_DATASOURCE="postgres://mmuser:mostest@postgres:5432/latest?sslmode=disable&connect_timeout=10" ARGS="version" 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
|
||||||
@@ -249,6 +249,7 @@ jobs:
|
|||||||
echo "Generating diff"
|
echo "Generating diff"
|
||||||
diff migrated.sql latest.sql > diff.txt && echo "Both schemas are same" || (echo "Schema mismatch" && cat diff.txt && exit 1)
|
diff migrated.sql latest.sql > diff.txt && echo "Both schemas are same" || (echo "Schema mismatch" && cat diff.txt && exit 1)
|
||||||
no_output_timeout: 1h
|
no_output_timeout: 1h
|
||||||
|
|
||||||
upload-s3-sha:
|
upload-s3-sha:
|
||||||
docker:
|
docker:
|
||||||
- image: 'circleci/python:2.7'
|
- image: 'circleci/python:2.7'
|
||||||
|
|||||||
@@ -164,14 +164,15 @@ func TestStartServerTLSOverwriteCipher(t *testing.T) {
|
|||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
CipherSuites: []uint16{
|
CipherSuites: []uint16{
|
||||||
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
|
tls.TLS_RSA_WITH_AES_128_GCM_SHA256,
|
||||||
},
|
},
|
||||||
|
MaxVersion: tls.VersionTLS12,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
client := &http.Client{Transport: tr}
|
client := &http.Client{Transport: tr}
|
||||||
err = checkEndpoint(t, client, "https://localhost:"+strconv.Itoa(s.ListenAddr.Port)+"/", http.StatusNotFound)
|
err = checkEndpoint(t, client, "https://localhost:"+strconv.Itoa(s.ListenAddr.Port)+"/", http.StatusNotFound)
|
||||||
|
require.Error(t, err, "Expected error due to Cipher mismatch")
|
||||||
if !strings.Contains(err.Error(), "remote error: tls: handshake failure") {
|
if !strings.Contains(err.Error(), "remote error: tls: handshake failure") {
|
||||||
t.Errorf("Expected protocol version error, got %s", err)
|
t.Errorf("Expected protocol version error, got %s", err)
|
||||||
}
|
}
|
||||||
@@ -183,6 +184,7 @@ func TestStartServerTLSOverwriteCipher(t *testing.T) {
|
|||||||
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
||||||
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
||||||
},
|
},
|
||||||
|
MaxVersion: tls.VersionTLS12,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
FROM golang:1.12
|
FROM golang:1.13
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y make git apt-transport-https ca-certificates curl software-properties-common build-essential zip xmlsec1
|
RUN apt-get update && apt-get install -y make git apt-transport-https ca-certificates curl software-properties-common build-essential zip xmlsec1 jq
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ def platformStages = new org.mattermost.PlatformStages()
|
|||||||
|
|
||||||
def rndEE = UUID.randomUUID().toString()
|
def rndEE = UUID.randomUUID().toString()
|
||||||
def rndTE = UUID.randomUUID().toString()
|
def rndTE = UUID.randomUUID().toString()
|
||||||
def mmBuilderServer = 'mattermost/mattermost-build-server:sep-17-2019'
|
def mmBuilderServer = 'mattermost/mattermost-build-server:oct-18-2019'
|
||||||
def mmBuilderWebapp = 'mattermost/mattermost-build-webapp:oct-2-2018'
|
def mmBuilderWebapp = 'mattermost/mattermost-build-webapp:oct-2-2018'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
withDockerContainer(args: '-u root --privileged -v ${WORKSPACE}/src:/go/src/', image: 'mattermost/mattermost-build-server:sep-17-2019') {
|
withDockerContainer(args: '-u root --privileged -v ${WORKSPACE}/src:/go/src/', image: 'mattermost/mattermost-build-server:oct-18-2019') {
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
sh """
|
sh """
|
||||||
cd /go/src/github.com/mattermost/mattermost-server
|
cd /go/src/github.com/mattermost/mattermost-server
|
||||||
@@ -272,7 +272,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:sep-17-2019') {
|
withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:oct-18-2019') {
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
sh """
|
sh """
|
||||||
cd /go/src/github.com/mattermost/mattermost-server
|
cd /go/src/github.com/mattermost/mattermost-server
|
||||||
@@ -328,7 +328,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:sep-17-2019') {
|
withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:oct-18-2019') {
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
sh """
|
sh """
|
||||||
cd /go/src/github.com/mattermost/mattermost-server
|
cd /go/src/github.com/mattermost/mattermost-server
|
||||||
@@ -353,9 +353,9 @@ pipeline {
|
|||||||
dir('src/github.com/mattermost/mattermost-server') {
|
dir('src/github.com/mattermost/mattermost-server') {
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
sh """
|
sh """
|
||||||
echo "Ignoring known MySQL mismatch: ChannelMembers.SchemeGuest"
|
echo "Ignoring known MySQL mismatch: ChannelMembers.SchemeGuest"
|
||||||
/usr/local/bin/docker-compose --no-ansi -f build/docker-compose.yml exec -T mysql mysql -D migrated -uroot -pmostest -e "ALTER TABLE ChannelMembers DROP COLUMN SchemeGuest;"
|
/usr/local/bin/docker-compose --no-ansi -f build/docker-compose.yml exec -T mysql mysql -D migrated -uroot -pmostest -e "ALTER TABLE ChannelMembers DROP COLUMN SchemeGuest;"
|
||||||
/usr/local/bin/docker-compose --no-ansi -f build/docker-compose.yml exec -T mysql mysql -D latest -uroot -pmostest -e "ALTER TABLE ChannelMembers DROP COLUMN SchemeGuest;"
|
/usr/local/bin/docker-compose --no-ansi -f build/docker-compose.yml exec -T mysql mysql -D latest -uroot -pmostest -e "ALTER TABLE ChannelMembers DROP COLUMN SchemeGuest;"
|
||||||
|
|
||||||
echo "Generating dump"
|
echo "Generating dump"
|
||||||
/usr/local/bin/docker-compose --no-ansi -f build/docker-compose.yml exec -T mysql mysqldump --skip-opt --no-data --compact -u root -pmostest migrated > migrated.sql
|
/usr/local/bin/docker-compose --no-ansi -f build/docker-compose.yml exec -T mysql mysqldump --skip-opt --no-data --compact -u root -pmostest migrated > migrated.sql
|
||||||
@@ -375,7 +375,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:sep-17-2019') {
|
withDockerContainer(args: "-u root --privileged --net ${COMPOSE_PROJECT_NAME}_mm-test -v ${WORKSPACE}/src:/go/src/", image: 'mattermost/mattermost-build-server:oct-18-2019') {
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
sh """
|
sh """
|
||||||
cd /go/src/github.com/mattermost/mattermost-server
|
cd /go/src/github.com/mattermost/mattermost-server
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user