-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.gitlab-ci.maxiv.yml
More file actions
70 lines (65 loc) · 1.84 KB
/
.gitlab-ci.maxiv.yml
File metadata and controls
70 lines (65 loc) · 1.84 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
63
64
65
66
67
68
69
70
---
include:
- project: kits-maxiv/cfg-maxiv-gitlabci
file: "/PreCommit.gitlab-ci.yml"
- project: kits-maxiv/kubernetes/k8s-gitlab-ci
file: "/Docker-Helm-deploy.gitlab-ci.yml"
ref: "0.6"
# Override workflow rules to deploy on any branch
workflow:
rules:
- if: '$CI_COMMIT_BRANCH'
- if: '$CI_COMMIT_TAG'
stages:
- generate-jobs
- triggers
- .pre
- helm_package
- check
- build
- test
- deploy
- uninstall
- .post
variables:
DOCKER_REGISTRY_URL: "harbor.maxiv.lu.se/notify-server"
HELM_CHART_REPO: oci://harbor.maxiv.lu.se/notify-server/charts
HELM_CHART_NAME: notify-server
HELM_RELEASE_NAMESPACE_TEST: notify
HELM_RELEASE_NAMESPACE_PROD: notify
PIPELINES_FF_TOKENIZER: "true"
PRODUCTION_BRANCH_NAME: "master"
PRODUCTION_DEPLOY_ON_TAG: "true"
HELM_SET_PROD_ingress_host: "notify.maxiv.lu.se"
HELM_SET_TEST_ingress_host: "notify-test-${CI_COMMIT_BRANCH}.apps.okdev.maxiv.lu.se"
HELM_SET_PROD_image_repository: "__from_env_var:REGISTRY_IMAGE_NAME"
HELM_SET_PROD_image_tag: "__from_env_var:REGISTRY_IMAGE_TAG"
HELM_SET_TEST_image_repository: "__from_env_var:REGISTRY_IMAGE_NAME"
HELM_SET_TEST_image_tag: "__from_env_var:REGISTRY_IMAGE_TAG"
GITLAB_ENVIRONMENT_NAME: notify
# Test with latest versions of requirements
test-python311:
stage: test
tags:
- kubernetes
image: harbor.maxiv.lu.se/dockerhub/library/python:3.11
before_script:
- pip install -e .[tests]
script:
- pytest --junitxml=junit.xml --cov-report=xml:coverage.xml --cov-report=term --cov=app -v
artifacts:
paths:
- junit.xml
- coverage.xml
reports:
junit: junit.xml
# Test with frozen requirements
test-docker-image:
stage: test
tags:
- kubernetes
image: "$REGISTRY_IMAGE_NAME:$REGISTRY_IMAGE_TAG"
before_script:
- pip install --no-cache-dir .[tests]
script:
- pytest -v