-
Notifications
You must be signed in to change notification settings - Fork 39
/
.gitlab-ci.yml
70 lines (63 loc) · 1.66 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
variables:
DOCKER_DRIVER: overlay2
stages:
- build
- deploy
cache:
key: ${CI_BUILD_STAGE}
paths:
- .gradle
build for all:
image: openjdk:8-jdk-alpine
tags:
- wallet-dev
stage: build
script:
- pwd
- ./gradlew wallet-webapi:bootRepackage
- ./gradlew wallet-task:bootRepackage
- ./gradlew wallet-hsm:bootRepackage
artifacts:
paths:
- wallet-webapi/build/libs/*.jar
- wallet-hsm/build/libs/*.jar
- wallet-task/build/libs/*.jar
expire_in: 20min
deploy for cl-webapi:
image: gitlab/dind:latest
tags:
- wallet-dev
stage: deploy
script:
- docker stop -f wallet-webapi ||true
- docker rm -f wallet-webapi ||true
- docker rmi wallet-webapi ||true
- docker build -t wallet-webapi wallet-webapi/.
- docker run -d --name wallet-webapi -p 10001:10001 -v /etc/localtime:/etc/localtime cl-webapi
when: manual
deploy for cl-task:
image: gitlab/dind:latest
tags:
- wallet-dev
stage: deploy
script:
- docker stop -f wallet-task ||true
- docker rm -f wallet-task ||true
- docker rmi wallet-task ||true
- docker build -t wallet-task wallet-task/.
- docker run -d --name wallet-task -p 10033:10033 -v /etc/localtime:/etc/localtime wallet-task
when: manual
deploy for cl-hsm:
image: gitlab/dind:latest
tags:
- wallet-dev
stage: deploy
script:
- docker stop -f wallet-hsm ||true
- docker rm -f wallet-hsm ||true
- docker rmi wallet-hsm ||true
- docker build -t wallet-hsm wallet-hsm/.
- docker run -d --name wallet-hsm -p 10888:10888 -v /etc/localtime:/etc/localtime -v /mnt/wallets:/mnt/wallets cl-hsm
when: manual
after_script:
- echo "End CI"