Updates on CI (#17484)
* moving mattermost-ver and golangci out from the build step * adjusting resource class and update image for check-mocks job
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0e0746df8b
Коммит
b0279a432d
@@ -12,6 +12,7 @@ executors:
|
|||||||
image: "ubuntu-1604:201903-01"
|
image: "ubuntu-1604:201903-01"
|
||||||
environment:
|
environment:
|
||||||
COMPOSE_PROJECT_NAME: "circleci"
|
COMPOSE_PROJECT_NAME: "circleci"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
working_directory: ~/mattermost/mattermost-server
|
working_directory: ~/mattermost/mattermost-server
|
||||||
@@ -129,9 +130,10 @@ jobs:
|
|||||||
cd mattermost-server
|
cd mattermost-server
|
||||||
make store-layers
|
make store-layers
|
||||||
if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi
|
if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi
|
||||||
|
|
||||||
check-mocks:
|
check-mocks:
|
||||||
docker:
|
docker:
|
||||||
- image: mattermost/mattermost-build-server:20200731_golang-1.14.6
|
- image: mattermost/mattermost-build-server:20201119_golang-1.15.5
|
||||||
working_directory: ~/mattermost
|
working_directory: ~/mattermost
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
@@ -141,6 +143,7 @@ jobs:
|
|||||||
cd mattermost-server
|
cd mattermost-server
|
||||||
make einterfaces-mocks store-mocks
|
make einterfaces-mocks store-mocks
|
||||||
if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make einterfaces-mocks store-mocks`"; exit 1; fi
|
if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make einterfaces-mocks store-mocks`"; exit 1; fi
|
||||||
|
|
||||||
check-migrations:
|
check-migrations:
|
||||||
docker:
|
docker:
|
||||||
- image: mattermost/mattermost-build-server:20201119_golang-1.15.5
|
- image: mattermost/mattermost-build-server:20201119_golang-1.15.5
|
||||||
@@ -155,6 +158,36 @@ jobs:
|
|||||||
export PATH=$PATH:$GOBIN
|
export PATH=$PATH:$GOBIN
|
||||||
make migrations-bindata
|
make migrations-bindata
|
||||||
if [[ -n $(git status --porcelain) ]]; then echo "Please update the migration bindata using `make migrations-bindata`"; exit 1; fi
|
if [[ -n $(git status --porcelain) ]]; then echo "Please update the migration bindata using `make migrations-bindata`"; exit 1; fi
|
||||||
|
|
||||||
|
# Dedicate 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:
|
||||||
|
- image: golangci/golangci-lint:v1.33.2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
command: 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:20201119_golang-1.15.5
|
||||||
|
working_directory: ~/mattermost
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: ~/mattermost/
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
echo "Installing mattermost-govet"
|
||||||
|
export GOBIN=${PWD}/mattermost-server/bin
|
||||||
|
GO111MODULE=off go get -u github.com/mattermost/mattermost-govet
|
||||||
|
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:
|
build-api-spec:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:lts
|
- image: circleci/node:lts
|
||||||
@@ -184,15 +217,8 @@ jobs:
|
|||||||
at: ~/mattermost/
|
at: ~/mattermost/
|
||||||
- run:
|
- run:
|
||||||
command: |
|
command: |
|
||||||
echo "Installing golangci-lint"
|
|
||||||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/local/bin v1.33.2
|
|
||||||
echo "Installing mattermost-govet"
|
|
||||||
export GOBIN=${PWD}/mattermost-server/bin
|
|
||||||
GO111MODULE=off go get -u github.com/mattermost/mattermost-govet
|
|
||||||
export PATH=$PATH:$GOBIN
|
|
||||||
cd mattermost-server
|
cd mattermost-server
|
||||||
make config-reset
|
make config-reset
|
||||||
make check-style 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'
|
|
||||||
make build-cmd BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}'
|
make build-cmd BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}'
|
||||||
make package BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}'
|
make package BUILD_NUMBER='${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}'
|
||||||
curl -sL https://sentry.io/get-cli/ | bash
|
curl -sL https://sentry.io/get-cli/ | bash
|
||||||
@@ -418,7 +444,6 @@ jobs:
|
|||||||
working_directory: ~/
|
working_directory: ~/
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/buildpack-deps:stretch
|
- image: circleci/buildpack-deps:stretch
|
||||||
resource_class: xlarge
|
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: .
|
at: .
|
||||||
@@ -451,6 +476,12 @@ workflows:
|
|||||||
# - check-i18n:
|
# - check-i18n:
|
||||||
# requires:
|
# requires:
|
||||||
# - setup
|
# - setup
|
||||||
|
- check-golangci-lint:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore:
|
||||||
|
- master
|
||||||
|
- /^release-.*/
|
||||||
- check-app-layers:
|
- check-app-layers:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
@@ -463,6 +494,9 @@ workflows:
|
|||||||
- check-migrations:
|
- check-migrations:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
|
- check-mattermost-vet:
|
||||||
|
requires:
|
||||||
|
- setup
|
||||||
- build-api-spec:
|
- build-api-spec:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
@@ -473,6 +507,8 @@ workflows:
|
|||||||
- check-store-layers
|
- check-store-layers
|
||||||
- check-mocks
|
- check-mocks
|
||||||
- check-migrations
|
- check-migrations
|
||||||
|
- check-mattermost-vet
|
||||||
|
- check-golangci-lint
|
||||||
- build-api-spec
|
- build-api-spec
|
||||||
- upload-s3-sha:
|
- upload-s3-sha:
|
||||||
context: mattermost-ci-pr-builds-s3
|
context: mattermost-ci-pr-builds-s3
|
||||||
@@ -531,6 +567,13 @@ workflows:
|
|||||||
# - check-i18n:
|
# - check-i18n:
|
||||||
# requires:
|
# requires:
|
||||||
# - setup
|
# - setup
|
||||||
|
- check-golangci-lint:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- /^release-.*/
|
||||||
|
- cloud
|
||||||
- check-app-layers:
|
- check-app-layers:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
|
|||||||
3
Makefile
3
Makefile
@@ -325,7 +325,8 @@ ifeq ($(BUILD_ENTERPRISE_READY),true)
|
|||||||
./scripts/prereq-check-enterprise.sh
|
./scripts/prereq-check-enterprise.sh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
check-style: golangci-lint plugin-checker vet ## Runs golangci against all packages
|
check-style: golangci-lint plugin-checker vet ## Runs style/lint checks
|
||||||
|
|
||||||
|
|
||||||
do-cover-file: ## Creates the test coverage report file.
|
do-cover-file: ## Creates the test coverage report file.
|
||||||
@echo "mode: count" > cover.out
|
@echo "mode: count" > cover.out
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user