-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
62 lines (58 loc) · 1.67 KB
/
.gitlab-ci.yml
File metadata and controls
62 lines (58 loc) · 1.67 KB
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
stages:
- build
- test
run_unit_tests:
image: docker-registry.ebrains.eu/model-catalog/node:22-alpine
stage: test
rules:
- changes:
- apps/model_catalog/**/*
- .gitlab-ci.yml
script:
- cd apps/model_catalog
- npm ci --legacy-peer-deps
- npm run test
tags:
- docker-runner
run_cypress_tests:
image: cypress/browsers:22.19.0
stage: test
variables:
VITE_SKIP_AUTH: "true"
rules:
- if: '$CI_COMMIT_REF_NAME == "staging"'
changes:
- apps/model_catalog/**/*
- .gitlab-ci.yml
script:
- cd apps/model_catalog
# install dependencies
- npm ci --legacy-peer-deps
# start server and run Cypress tests
- npm run e2e:ci
tags:
- docker-runner
build_apps_staging_image:
stage: build
rules:
- if: '$CI_COMMIT_REF_NAME == "staging"'
changes:
- apps/**/*
script:
- docker build -f apps/deployment/Dockerfile.staging -t docker-registry.ebrains.eu/model-catalog/model-catalog-v2:staging ./apps
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/model-catalog/model-catalog-v2:staging
tags:
- shell-runner
build_apps_prod_image:
stage: build
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
changes:
- apps/**/*
script:
- docker build -f apps/deployment/Dockerfile.prod -t docker-registry.ebrains.eu/model-catalog/model-catalog-v2:prod ./apps
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/model-catalog/model-catalog-v2:prod
tags:
- shell-runner