-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.gitlab-ci.yml
57 lines (51 loc) · 1.79 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
services:
- docker:18-dind
variables:
GITHUB_REF: $CI_COMMIT_SHA
DH_IMAGE: tokend/web-client
stages:
- build
- publish
build:
image: registry.gitlab.com/tokend/deployment/docker-build:latest
stage: build
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
tags:
- tokend
script:
- ci-little-helper set-pending build
- .ci/build.sh && STATE=0 || STATE=1
- ci-little-helper set-state $STATE build && exit $STATE
lint:
image: registry.gitlab.com/tokend/deployment/js-build:latest
stage: build
tags:
- tokend
script:
- ci-little-helper set-pending lint
- .ci/lint.sh && STATE=0 || STATE=1
- ci-little-helper set-state $STATE lint && exit $STATE
unit_test:
image: registry.gitlab.com/tokend/deployment/js-build:latest
stage: build
tags:
- tokend
script:
- ci-little-helper set-pending unit_test
- .ci/test.sh && STATE=0 || STATE=1
- ci-little-helper set-state $STATE unit_test && exit $STATE
publish dockerhub:
image: registry.gitlab.com/tokend/deployment/docker-build:latest
stage: publish
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PWD
tags:
- tokend
only:
- /^.+\..+\..+$/
script:
- ci-little-helper set-pending publish
- .ci/publish.sh && STATE=0 || STATE=1
- ci-little-helper set-state $STATE publish && exit $STATE