-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
64 lines (52 loc) · 1.43 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
image: node:10
cache:
paths:
- $HOME/.npm
- node_modules
stages:
- test
- patch_version
- deploy
.test:
before_script:
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- apt-get update && apt-get install -y google-chrome-stable
- npm ci
stage: test
script:
- npm test
retry: 2
only:
- master
deploy_dev:
stage: deploy
when: on_success
before_script:
- npm ci
script:
- GIT_COMMIT=$(git rev-parse --short HEAD)
- ./node_modules/.bin/ember deploy development --verbose --activate
only:
- dev
deploy_prod:
stage: deploy
when: on_success
before_script:
- npm ci
script:
- ./node_modules/.bin/ember deploy production --verbose --activate
only:
- master
patch_version:
stage: patch_version
when: on_success
script:
- echo "git push"
- git config --global user.email "[email protected]"
- git config --global user.name "Duffy runner"
- npm version patch -m "Version up to %s [skip ci]"
- git push https://${GITLAB_USER_LOGIN}:${CI_ACCESS_TOKEN}@gitlab.com/ollar/cheevies.git HEAD:${CI_COMMIT_REF_NAME}
only:
refs:
- dev