-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
79 lines (72 loc) · 1.68 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
stages:
- test
- build
- deploy
eslint:
stage: test
image: node:latest
before_script:
- npm install
script:
- npm run eslint
stylelint:
stage: test
image: node:latest
before_script:
- npm install
script:
- npm run stylelint
build_master:
stage: build
image: docker:stable
variables:
GIT_SUBMODULE_STRATEGY: normal
DOCKER_DRIVER: overlay2
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --cache-from "$CI_REGISTRY_IMAGE:latest" --pull -t "$CI_REGISTRY_IMAGE:latest" ./
- docker push "$CI_REGISTRY_IMAGE:latest"
only:
- master
environment:
name: production
url: https://amiv.ethz.ch
build_dev:
stage: build
image: docker:stable
variables:
GIT_SUBMODULE_STRATEGY: normal
DOCKER_DRIVER: overlay2
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --cache-from "$CI_REGISTRY_IMAGE:dev" --build-arg NPM_BUILD_COMMAND=build-dev --pull -t "$CI_REGISTRY_IMAGE:dev" ./
- docker push "$CI_REGISTRY_IMAGE:dev"
environment:
name: development
url: https://web-dev.amiv.ethz.ch
deploy_dev:
stage: deploy
image: amiveth/service-update-helper
before_script:
- export CI_DEPLOY_SERVICE="${CI_DEPLOY_SERVICE}-dev"
script:
- /update.py
allow_failure: true
deploy_cluster:
stage: deploy
image: amiveth/service-update-helper
script:
- /update.py
only:
- master
deploy_pazuzu:
stage: deploy
image: amiveth/service-update-helper
before_script:
- export CI_DEPLOY_URL="$CI_DEPLOY_URL_PAZUZU"
script:
- /update.py
only:
- master