代码拉取完成,页面将自动刷新
stages:
# - test
- build
- publish
- create-vars
- trigger-build-ee
include:
- project: mattermost/ci/mattermost-server
ref: master
file: private.yml
# - local: .gitlab-ci/test.yml
# - local: .gitlab-ci/test-schema.yml
variables:
BUILD: "yes"
TEST: "no"
empty:
stage: create-vars
script:
- echo "empty"
#lint:
# image: $CI_REGISTRY/mattermost/ci/images/golangci-lint:v1.38.0
# stage: .pre
# script:
# - GO111MODULE=off GOBIN=$PWD/bin go get -u github.com/mattermost/mattermost-govet
# - make config-reset
# - make check-style #todo MM_VET_OPENSPEC_PATH='$CI_PROJECT_DIR/mattermost-api-reference/v4/html/static/mattermost-openapi-v4.yaml'
# timeout: 60 mins
# rules:
# - if: '$TEST == "yes"'
#
#layers:
# image: $CI_REGISTRY/mattermost/ci/images/mattermost-build-server:20201119_golang-1.15.5
# stage: .pre
# script:
# - make store-layers
# - if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi
# - git reset --hard
# - make app-layers
# - if [[ -n $(git status --porcelain) ]]; then echo "Please update the app layers using make app-layers"; exit 1; fi
# - git reset --hard
# rules:
# - if: '$TEST == "yes"'
#
#test-postgres:
# extends: .test
# tags:
# - docker
# variables:
# MM_SQLSETTINGS_DATASOURCE: "postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10"
# MM_SQLSETTINGS_DRIVERNAME: postgres
# rules:
# - if: '$TEST == "yes"'
#
#test-mysql:
# extends: .test
# tags:
# - docker
# variables:
# MM_SQLSETTINGS_DATASOURCE: "mmuser:mostest@tcp(mysql:3306)/mattermost_test?charset=utf8mb4,utf8&multiStatements=true"
# MM_SQLSETTINGS_DRIVERNAME: mysql
# rules:
# - if: '$TEST == "yes"'
#
#test-schema-postgres:
# extends: .test-schema
# tags:
# - docker
# script:
# - 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 5.0"
# - docker-compose --no-ansi exec -T postgres psql -U mmuser -d migrated < ../scripts/mattermost-postgresql-5.0.sql
# - >
# docker run -d -it --name server-postgres --net build_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 $CI_PROJECT_DIR:/mattermost-server \
# -w /mattermost-server \
# mattermost/mattermost-build-server:20201119_golang-1.15.5 \
# 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"
# - docker logs -f server-postgres
# - 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)
# rules:
# - if: '$TEST == "yes"'
#
#test-schema-mysql:
# extends: .test-schema
# tags:
# - docker
# script:
# - 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 5.0"
# - docker-compose --no-ansi exec -T mysql mysql -D migrated -uroot -pmostest < ../scripts/mattermost-mysql-5.0.sql
# - >
# docker run -d -it --name server-mysql --net build_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 $CI_PROJECT_DIR:/mattermost-server \
# -w /mattermost-server \
# mattermost/mattermost-build-server:20201119_golang-1.15.5 \
# bash -c "ulimit -n 8096; make ARGS='version' run-cli && make MM_SQLSETTINGS_DATASOURCE='mmuser:mostest@tcp(mysql:3306)/latest?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s' ARGS='version' run-cli"
# - docker logs -f server-mysql
# - echo "Ignoring known MySQL mismatch 'ChannelMembers.SchemeGuest'"
# - docker-compose --no-ansi exec -T mysql mysql -D migrated -uroot -pmostest -e "ALTER TABLE ChannelMembers DROP COLUMN SchemeGuest;" || echo "drop failed"
# - docker-compose --no-ansi exec -T mysql mysql -D latest -uroot -pmostest -e "ALTER TABLE ChannelMembers DROP COLUMN SchemeGuest;" || echo "drop failed"
# - 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"
# rules:
# - if: '$TEST == "yes"'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。