-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
80 lines (74 loc) · 1.73 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
72
73
74
75
76
77
78
79
80
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- deploy
- setup
- maintenance
#jobs:
build_images:
stage: build
needs: [ ]
tags:
- docker
- docker-compose
script:
- docker-compose -f docker-compose.base.yml build --pull --parallel --force-rm --no-cache
except:
- schedules
deploy_containers:
stage: deploy
needs: [ "build_images" ]
environment:
name: production
tags:
- deploy
- docker
- docker-compose
script:
- docker-compose -f docker-compose.base.yml -f $CONFIG_DOCKER_COMPOSE down
- docker-compose -f docker-compose.base.yml -f $CONFIG_DOCKER_COMPOSE up -d --remove-orphans
except:
- schedules
warmup_container_caches:
stage: setup
needs: [ "deploy_containers" ]
environment:
name: production
tags:
- deploy
- docker
- docker-compose
script:
- docker-compose -f docker-compose.base.yml -f $CONFIG_DOCKER_COMPOSE exec -T php-fpm sh -c "./bin/console cache:warmup --CI --force-index"
except:
- schedules
collect_container_logs:
stage: maintenance
needs: [ "deploy_containers" ]
environment:
name: production
when: manual
tags:
- deploy
- docker
- docker-compose
script:
- docker-compose -f docker-compose.base.yml logs redis
- docker-compose -f docker-compose.base.yml logs nginx
- docker-compose -f docker-compose.base.yml logs php-fpm
except:
- schedules
refresh_container_caches:
stage: maintenance
needs: [ "deploy_containers" ]
environment:
name: production
tags:
- deploy
- docker
- docker-compose
script:
- docker-compose -f docker-compose.base.yml -f $CONFIG_DOCKER_COMPOSE exec -T php-fpm sh -c "./bin/console cache:warmup --CI"
only:
- schedules