-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
33 lines (27 loc) · 1.21 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
image: docker:19.03.12
services:
- docker:19.03.12-dind
variables:
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build-grpc-server:
stage: build
script:
- docker pull $CI_REGISTRY_IMAGE:grpc-server || true
- docker build --cache-from $CI_REGISTRY_IMAGE:grpc-server --tag $CI_REGISTRY_IMAGE:grpc-server -f backend/grpc-server/production.Dockerfile backend/grpc-server
- docker push $CI_REGISTRY_IMAGE:grpc-server
build-http-server:
stage: build
script:
- docker pull $CI_REGISTRY_IMAGE:http-server || true
- docker build --cache-from $CI_REGISTRY_IMAGE:http-server --tag $CI_REGISTRY_IMAGE:http-server -f backend/http-server/production.Dockerfile backend/http-server
- docker push $CI_REGISTRY_IMAGE:http-server
build-web-app:
stage: build
script:
- docker pull $CI_REGISTRY_IMAGE:web-app || true
- docker build --cache-from $CI_REGISTRY_IMAGE:web-app --tag $CI_REGISTRY_IMAGE:web-app -f frontend/web-app/production.Dockerfile frontend/web-app
- docker push $CI_REGISTRY_IMAGE:web-app