-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
54 lines (47 loc) · 944 Bytes
/
.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
image: node:8.11.3
stages:
- ver
- tests
- deploy
ver:
stage: ver
script:
- node --version
- whoami
tags:
- docker
all_tests:
stage: tests
script:
- yarn install
- yarn run test
tags:
- docker
deploy_staging:
stage: deploy
script:
- git remote add heroku https://heroku:$HEROKU_API_KEY@git.heroku.com/node-ci-staging.git
- git push heroku master
- echo "Deployed to staging server"
environment:
name: staging
url: https://node-ci-staging.herokuapp.com/
only:
- master
tags:
- docker
deploy_production:
stage: deploy
script:
- git remote add heroku https://heroku:$HEROKU_API_KEY@git.heroku.com/node-ci-prod.git
- git push heroku master
- echo "Deployed to production server"
environment:
name: production
url: https://node-ci-prod.herokuapp.com/
when: manual
only:
- master
- git push heroku master
tags:
- docker