-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
38 lines (31 loc) · 984 Bytes
/
.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
variables:
APP_NAME_FRONT: rnaget-nginx
APP_NAME_BACK: rnaget-server
BASE_PATH: /rnaget-beacon
stages:
- build
- deploy
build_containers:
only:
- master
tags:
- docker
- monstre
stage: build
image: docker:latest
before_script:
- echo $CI_REGISTRY_PASSWORD | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
script:
- docker build --build-arg BASE_PATH="$BASE_PATH" -t gitlab.linux.crg.es:5005/monstre/rnaget-beacon-demo/$APP_NAME_FRONT ./nginx
- docker push gitlab.linux.crg.es:5005/monstre/rnaget-beacon-demo/$APP_NAME_FRONT
- docker build -t gitlab.linux.crg.es:5005/monstre/rnaget-beacon-demo/$APP_NAME_BACK ./server
- docker push gitlab.linux.crg.es:5005/monstre/rnaget-beacon-demo/$APP_NAME_BACK
deploy_containers:
stage: deploy
tags:
- shell
- monstre
script:
- cat $ENV_FILE > .env
- docker-compose -f docker-compose.yml down -v
- docker-compose -f docker-compose.yml up -d