-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
54 lines (50 loc) · 1.26 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
variables:
DOCKER_DRIVER: overlay
stages:
- build
- deploy
build_front:
tags:
- dev
- master
image: docker:latest
stage: build
services:
- name: docker:dind
before_script:
- docker container ls
- docker images
script:
- docker-compose -f docker-compose-build.yml up --no-start --build --force-recreate --no-deps
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker tag monitoring_service $DOCKER_USER/monitoring_service:latest
- docker push $DOCKER_USER/monitoring_service:latest
after_script:
- docker-compose -f docker-compose-build.yml down --remove-orphans -v -f
- docker container ls
- docker images
only:
- dev
- master
deploy_front:
tags:
- dev
- master
image: docker:latest
stage: deploy
services:
- name: docker:dind
before_script:
- docker images
- docker container ls
- docker-compose -f docker-compose-deploy.yml down --remove-orphans -v -f || true
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker pull automatedtestingservice/monitoring_service:latest
- docker-compose -f docker-compose-deploy.yml up -d --force-recreate --no-deps
after_script:
- docker container ls
- docker images
only:
- dev
- master