-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
95 lines (76 loc) · 2.32 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
95 lines (76 loc) · 2.32 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# SPDX-FileCopyrightText: Magenta ApS
# SPDX-License-Identifier: MPL-2.0
stages:
- lint
- build
- test
- coverage
- release
- deploy
variables:
OS2MO_INIT_CONFIG: "/builds/$CI_PROJECT_PATH/dev-environment/init.config.yml"
IMAGE_SHA: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}
RELEASE_REGISTRY: docker.io
RELEASE_REGISTRY_IMAGE: index.docker.io/magentaaps/os2mo-sdtool-plus
PYTEST_COV_MODULE: sdtoolplus
PYTEST_COV_FAIL_UNDER: 50
PRECOMMIT_USE_POETRY: "true"
POETRY_VERSION: "1.3.1"
PRODUCT: os2mo
COMPONENT: sdtoolplus
# Conditions
#############
.if-default-branch-refs: &if-default-branch-refs
if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
.if-tag: &if-tag
if: '$CI_COMMIT_TAG'
.if-merge-request: &if-merge-request
if: '$CI_MERGE_REQUEST_IID'
# Workflow
###########
workflow:
rules:
- <<: *if-tag
- <<: *if-default-branch-refs
- <<: *if-merge-request
include:
- project: rammearkitektur/os2mo
file:
- gitlab-ci-templates/integration-test-meta.v1.yml
- project: labs/salt-automation
file:
- /gitlab-ci-templates/common/rules.v1.yml
- /gitlab-ci-templates/common/pre-commit.v1.yml
- /gitlab-ci-templates/common/conventional-commits.v1.yml
- /gitlab-ci-templates/python/pytest.v1.yml
- /gitlab-ci-templates/common/docker-build.v1.yml
- /gitlab-ci-templates/common/docker-release.v1.yml
- /gitlab-ci-templates/common/config-updater-salt.v1.yml
- /gitlab-ci-templates/common/config-updater-flux.v1.yml
Test:
variables:
PYTEST_ADDOPTS: "-m 'not integration_test'"
Integration-test:
extends:
- .integration-test:mo
parallel: 3
services:
- !reference [.integration-test:mo, services]
- name: rabbitmq:4-management
alias: sd-amqp
variables:
RUN_ALEMBIC_MIGRATIONS: "false"
SD_USERNAME: "username"
SD_PASSWORD: "password"
SD_INSTITUTION_IDENTIFIER: "XY"
DB_PASSWORD: "super_secret_sd_payload_password"
MO_SUBTREE_PATH_FOR_ROOT: '["12121212-1212-1212-1212-121212121212"]'
OBSOLETE_UNIT_ROOTS: '["cccccccc-cccc-cccc-cccc-cccccccccccc"]'
BUILD_EXTRA_TREE: "true"
EMAIL_NOTIFICATIONS_ENABLED: "true"
EMAIL_HOST: "smtp.example.org"
EMAIL_USER: "email_user"
EMAIL_PASSWORD: "secret"
EMAIL_TO: '["to@example.org"]'
rules:
- <<: *if-merge-request