-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
41 lines (38 loc) · 1.18 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
stages:
- test
- build
test_app:
stage: test
script:
- cd apps/nar-v3
- npm ci
- npm run testci # runs all tests whose name does _not_ contain "KG"
tags:
- docker-runner
image: docker-registry.ebrains.eu/neuralactivity/node:20-alpine
build_image_production:
stage: build
only:
variables:
- $CI_COMMIT_BRANCH == "main"
script:
- cd apps/nar-v3
- docker build -f deployment/Dockerfile -t docker-registry.ebrains.eu/neuralactivity/nar-app-v3: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/neuralactivity/nar-app-v3:prod
tags:
- shell-runner
build_image_development:
stage: build
only:
variables:
- $CI_COMMIT_BRANCH == "development"
script:
- cd apps/nar-v3
- docker build -f deployment/Dockerfile -t docker-registry.ebrains.eu/neuralactivity/nar-app-v3:dev .
- echo $DOCKER_REGISTRY_USER
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/neuralactivity/nar-app-v3:dev
tags:
- shell-runner