-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
115 lines (104 loc) · 2.21 KB
/
.gitlab-ci.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
104
105
106
107
108
109
110
111
112
113
114
115
image: node:14-alpine
stages:
- deps
- tests
- deploy
- destroy
deps:
stage: deps
script:
- docker build --target deps . -t $CI_COMMIT_REF_NAME-deps
tags:
- shell
jest:
stage: tests
script:
- docker run -t $CI_COMMIT_REF_NAME-deps 'npm' 'run' 'test:ci'
coverage: '/Lines\s+:\s([\d\.]+)/'
artifacts:
expire_in: 3 days
paths:
- coverage
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
tags:
- shell
needs:
- deps
eslint:
stage: tests
script:
- - docker run -t $CI_COMMIT_REF_NAME-deps 'npm' 'run' 'lint:ci'
tags:
- shell
needs:
- deps
typescript:
stage: tests
script:
- docker run -t $CI_COMMIT_REF_NAME-deps 'npm' 'run' 'types:check'
tags:
- shell
needs:
- deps
alpha:
stage: deploy
environment:
name: review/$CI_BUILD_REF_NAME
url: https://$CI_COMMIT_REF_SLUG.rechat.co/
on_stop: destroy
script:
- ./dokku.sh
- docker cp $CI_BUILD_REF_NAME.web.1:/app/statoscope.html .
artifacts:
name: "Statoscope Bundle Analyzer"
paths:
- ./statoscope.html
needs:
- deps
tags:
- shell
destroy:
stage: destroy
script:
- ./dokku-stop.sh
environment:
name: review/$CI_BUILD_REF_NAME
action: stop
when: manual
tags:
- shell
beta:
stage: deploy
image: timbru31/ruby-node:latest
before_script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl && gem install faraday -v 1.8.0
script:
- dpl --provider=heroku --app=rechat-irish --strategy=git --api-key=$HEROKU_API_KEY --username=$HEROKU_USERNAME --password=$HEROKU_PASSWORD
environment:
name: beta
url: https://beta.rechat.com
only:
- stage
tags:
- docker
production:
stage: deploy
image: timbru31/ruby-node:latest
before_script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl && gem install faraday -v 1.8.0
script:
- dpl --provider=heroku --app=rechat-web --strategy=git --api-key=$HEROKU_API_KEY --username=$HEROKU_USERNAME --password=$HEROKU_PASSWORD
environment:
name: production
url: https://app.rechat.com
only:
- master
tags:
- docker