-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
103 lines (94 loc) · 3.52 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
language: node_js
node_js:
- 12
services:
- docker
before_script:
- npm install
jobs:
include:
- stage: compile
if: branch = master
name: "Compile TypeScript and Lint"
script:
- npm run docker-build-watcher
- npm run lint
- stage: integration-tests
# security
script:
- npm run docker-build-security-prod
- npm run security-integration
name: "Security integration tests"
if: branch = master
- # mailer
script:
- npm run docker-build-mailer-prod
- npm run mailer-integration
env:
- TRANSPORT_SMTP_HOST=mailhog
- TRANSPORT_SMTP_PORT=1025
- TRANSPORT_SMTP_SECURE=false
name: "Mailer integration tests"
if: branch = master
- # notifications
script:
- npm run docker-build-notifications-prod
- npm run notifications-integration
name: "Notifications integration tests"
if: branch = master
- # scheduler
script:
- npm run docker-build-scheduler-prod
- npm run scheduler-integration
name: "Scheduler integration tests"
if: branch = master
- # gateway
script:
- npm run docker-build-gateway-prod
- npm run docker-build-security-prod
- npm run gateway-integration
name: "Gateway integration tests"
if: branch = master
- # pdf
script:
- npm run docker-build-pdf-prod
- npm run pdf-integration
name: "Pdf integration tests"
if: branch = master
- stage: deploy-redocs
if: branch = master AND type NOT IN (pull_request)
name: "Prepare and push API ReDocs to GitHub"
script:
- make install
- npm run build
- make npm-install-in-all-build-services
- node ./ci-scripts/generate-api-docs.js
- bash ./ci-scripts/api-docs-to-github.sh
- stage: deploy-docusaurus-to-github
if: branch = master AND type NOT IN (pull_request)
name: "Prepare and push Docusaurus Docs to GitHub"
script: bash ./ci-scripts/docusaurus-to-github.sh
- stage: deploy-mailer-to-docker-hub
if: tag =~ /^mailer/
name: "Deploy Mailer to DockerHub"
script: bash ./ci-scripts/docker-release.sh mailer ./services/mailer/docker/prod/Dockerfile ./services/mailer/package.json
- stage: deploy-scheduler-to-docker-hub
if: tag =~ /^scheduler/
name: "Deploy Scheduler to DockerHub"
script: bash ./ci-scripts/docker-release.sh scheduler ./services/scheduler/docker/prod/Dockerfile ./services/scheduler/package.json
- stage: deploy-security-to-docker-hub
if: tag =~ /^security/
name: "Deploy Security to DockerHub"
script: bash ./ci-scripts/docker-release.sh security ./services/security/docker/prod/Dockerfile ./services/security/package.json
- stage: deploy-gateway-to-docker-hub
if: tag =~ /^gateway/
name: "Deploy Gateway to DockerHub"
script: bash ./ci-scripts/docker-release.sh gateway ./services/gateway/docker/prod/Dockerfile ./services/gateway/package.json
- stage: deploy-notifications-to-docker-hub
if: tag =~ /^notifications/
name: "Deploy Notifications to DockerHub"
script: bash ./ci-scripts/docker-release.sh notifications ./services/notifications/docker/prod/Dockerfile ./services/notifications/package.json
- stage: deploy-pdf-to-docker-hub
if: tag =~ /^pdf/
name: "Deploy Pdf to DockerHub"
script: bash ./ci-scripts/docker-release.sh pdf ./services/pdf/docker/prod/Dockerfile ./services/pdf/package.json