Add new CI step for checking email templates (#18570)

* Add new CI step for checking email templates

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=2c1d9628-675f-4eb6-80bb-db9e4d09b8bf

```release-note
NONE
```

* Pre-install

```release-note
NONE
```

* pinning down to 4.9.0

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2021-10-07 13:07:38 +05:30
коммит произвёл GitHub
родитель 76d492f9ab
Коммит 9bbac354d8
2 изменённых файлов: 30 добавлений и 2 удалений

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

@@ -175,6 +175,20 @@ jobs:
make migrations-bindata
if [[ -n $(git status --porcelain) ]]; then echo "Please update the migration bindata using `make migrations-bindata`"; exit 1; fi
check-email-templates:
docker:
- image: cimg/go:1.17-node
working_directory: ~/mattermost
steps:
- attach_workspace:
at: ~/mattermost/
- run:
command: |
cd mattermost-server
sudo npm install -g mjml@4.9.0
make build-templates
if [[ -n $(git status --porcelain) ]]; then echo "Please update the email templates using `make build-templates`"; 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:
@@ -499,6 +513,9 @@ workflows:
- check-migrations:
requires:
- setup
- check-email-templates:
requires:
- setup
- check-mattermost-vet:
requires:
- setup
@@ -511,6 +528,7 @@ workflows:
- check-store-layers
- check-mocks
- check-migrations
- check-email-templates
- check-mattermost-vet
- check-golangci-lint
- build-api-spec
@@ -536,6 +554,7 @@ workflows:
- check-store-layers
- check-mocks
- check-migrations
- check-email-templates
- test:
name: test-postgres
dbdriver: postgres
@@ -546,13 +565,14 @@ workflows:
- check-store-layers
- check-mocks
- check-migrations
- check-email-templates
- test-schema:
requires:
- check-app-layers
- check-store-layers
- check-mocks
- check-migrations
- check-email-templates
release-build:
jobs:
- setup:
@@ -593,6 +613,9 @@ workflows:
- check-migrations:
requires:
- setup
- check-email-templates:
requires:
- setup
- check-mattermost-vet:
requires:
- setup
@@ -603,6 +626,7 @@ workflows:
- check-store-layers
- check-mocks
- check-migrations
- check-email-templates
- check-mattermost-vet
- check-golangci-lint
- build-api-spec
@@ -612,6 +636,7 @@ workflows:
- check-store-layers
- check-mocks
- check-migrations
- check-email-templates
- check-mattermost-vet
- build-api-spec
- test:
@@ -624,6 +649,7 @@ workflows:
- check-store-layers
- check-mocks
- check-migrations
- check-email-templates
- test:
name: test-postgres
dbdriver: postgres
@@ -634,4 +660,5 @@ workflows:
- check-store-layers
- check-mocks
- check-migrations
- check-email-templates
# test-schema for master run in .gitlab-ci.yml

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

@@ -2,10 +2,11 @@
OUTPUT_DIR=.
MJML=mjml
## Also update the circleCI file if you update this.
check-prereq: ## check if mjml is installed
@if ! [ -x "$$(command -v mjml)" ]; then \
echo "mjml is not installed. Installing mjml"; \
npm install -g mjml; \
npm install -g mjml@4.9.0; \
fi;