-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 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
stages:
- test
- build
- deploy
test:
image: node:10
stage: test
script:
- npm --no-color ci
- npm test
build:
image: node:10
stage: build
variables:
GENERATE_SOURCEMAP: 'false'
artifacts:
expire_in: 3 days
paths:
- build/
script:
- npm --no-color ci
- npm run build
publish:
image: docker:stable
stage: deploy
dependencies:
- build
services:
- docker:dind
only:
- master
variables:
IMAGE: mobileteam/swec-planner
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY/$IMAGE:latest .
- docker push $CI_REGISTRY/$IMAGE:latest
publish-feature:
image: docker:stable
stage: deploy
dependencies:
- build
services:
- docker:dind
only:
- web
variables:
IMAGE: mobileteam/swec-planner
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY/$IMAGE:$CI_COMMIT_REF_NAME .
- docker push $CI_REGISTRY/$IMAGE:$CI_COMMIT_REF_NAME