-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (63 loc) · 1.08 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
71
variables:
DOCKER_HOST: unix:///var/run/docker.sock
DOCKER_DRIVER: overlay2
image:
name: docker:24.0.6
stages:
- build
- deploy
- cleanup
build_demo:
stage: build
script:
- echo "DEMO build"
- docker compose -f docker-compose.demo.yml build
only:
- test
tags:
- test-apps
deploy_demo:
stage: deploy
script:
- echo "DEMO deploy"
- docker compose -f docker-compose.demo.yml up -d
only:
- test
tags:
- test-apps
cleanup_demo:
stage: cleanup
script:
- echo "DEMO system clean up"
- docker system prune -a -f --volumes
only:
- test
tags:
- test-apps
build_prod:
stage: build
script:
- echo "PROD build"
- docker compose -f docker-compose.prod.yml build
only:
- main
tags:
- prod
deploy_prod:
stage: deploy
script:
- echo "PROD deploy"
- docker compose -f docker-compose.prod.yml up -d
only:
- main
tags:
- prod
cleanup_prod:
stage: cleanup
script:
- echo "PROD system clean up"
- docker system prune -a --volumes -f
only:
- main
tags:
- prod