-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
32 lines (29 loc) · 1014 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
stages:
- build
build_production:
stage: build
only:
variables:
- $CI_COMMIT_BRANCH == "main"
script:
- export # debugging environment variables
- cd apps
- docker build -f deployment/Dockerfile.prod -t docker-registry.ebrains.eu/live-papers/live-papers-apps:prod .
- echo $DOCKER_REGISTRY_USER
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/live-papers/live-papers-apps:prod
tags:
- shell-runner
build_staging:
stage: build
only:
variables:
- $CI_COMMIT_BRANCH == "staging"
script:
- cd apps
- docker build -f deployment/Dockerfile.staging -t docker-registry.ebrains.eu/live-papers/live-papers-apps:staging .
- echo $DOCKER_REGISTRY_USER
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/live-papers/live-papers-apps:staging
tags:
- shell-runner