-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
40 lines (38 loc) · 1005 Bytes
/
Copy path.gitlab-ci.yml
File metadata and controls
40 lines (38 loc) · 1005 Bytes
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
stages:
- build
- deploy
docker-build-and-push:
image: docker:latest
stage: build
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_BE_REGISTRY_IMAGE" ./backend/
- docker build --pull -t "$CI_FE_REGISTRY_IMAGE" ./frontend/
- docker push "$CI_BE_REGISTRY_IMAGE"
- docker push "$CI_FE_REGISTRY_IMAGE"
only:
- master
deploy-to-digital-ocean:
image:
name: bitnami/kubectl:latest
entrypoint: [""]
stage: deploy
before_script:
- kubectl version
script:
- kubectl apply -f ./k8s/config.yml
- kubectl apply -f ./k8s/service.yml
- kubectl apply -f ./k8s/deployment.yml
after_script:
- kubectl get svc tecverify-fe -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
environment:
name: dev
url: http://139.59.48.64:3000/home
only:
- master