-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
60 lines (52 loc) · 1.03 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
image: starefossen/ruby-node:latest
variables:
PORT: 3000
APP_TITLE: "topcoder x app"
NODE_ENV: development
cache:
paths:
- node_modules/
stages:
- build
- test
- deploy
building:
script:
- echo "Building the app"
- npm i
stage: build
testing:
script:
- echo "Running tests"
- npm i
- npm test
stage: test
deploy_dev:
stage: deploy
script:
- echo "Deploying the app"
- apt-get update -qy
- apt-get install -y rubygems ruby-dev
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_DEV_APP --api-key=$HEROKU_DEV_API_KEY
only:
- develop
environment:
name: dev
url: $HEROKU_DEV_URL
deploy_stage:
stage: deploy
script:
- echo "Deploying the app"
- apt-get update -qy
- apt-get install -y rubygems ruby-dev
- gem install dpl
- dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_STAGING_API_KEY
only:
- master
environment:
name: stage
url: $HEROKU_STAGING_URL
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive