-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
98 lines (85 loc) · 2.83 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
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
96
97
98
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-FileCopyrightText: 2023-2024 Univention GmbH
---
include:
- project: "univention/customers/dataport/upx/common-ci"
ref: "v1.35.0"
file:
- "defaults/stages.yaml"
- "defaults/nubus-workflow.yaml"
- "jobs/lint-pre-commit-legacy.yaml"
- "jobs/lint-commit-messages.yaml"
- "jobs/semantic-release-env.yaml"
- "jobs/container-build-external.yaml"
- "jobs/package-and-publish-helm-charts-external.yaml"
- "jobs/check-debian-updates.yaml"
- project: "univention/dist/docker-services"
ref: "master"
file:
- "dind.yml"
lint-pre-commit-full:
rules:
- when: never
lint-pre-commit-legacy:
before_script:
- helm repo add bitnami "https://charts.bitnami.com/bitnami"
.build-matrix: &build-matrix
- IMAGE_NAME:
- "udm-rest-api"
- "testrunner"
- IMAGE_NAME: "udm-rest-api-python-client"
KANIKO_ARGS: "--target final"
DOCKERFILE_PATH: "docker/udm-rest-api-python-client/Dockerfile"
- IMAGE_NAME: "udm-cli"
KANIKO_ARGS: "--target cli"
DOCKERFILE_PATH: "docker/udm-rest-api-python-client/Dockerfile"
.publish-matrix: &publish-matrix
- IMAGE_NAME:
- "udm-rest-api"
- "udm-rest-api-python-client"
container-build:
parallel:
matrix: *build-matrix
container-malware-scan:
parallel:
matrix: *publish-matrix
container-sign-external:
parallel:
matrix: *build-matrix
test-udm-rest:
stage: "test"
extends: .dind
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: "never"
- when: "on_success"
image: "${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:24.0.7"
before_script:
# Allow that the Docker API version is negotiated between client and server
- unset DOCKER_API_VERSION
- export IMAGE_TAG=${RELEASE_VERSION}
- echo -e "\e[0Ksection_start:`date +%s`:docker_debug[collapsed=true]\r\e[0KDocker version details"
- echo $IMAGE_TAG
- docker version
- echo -e "\e[0Ksection_end:`date +%s`:docker_debug\r\e[0K"
- cp .env.udm-rest-api.example .env.udm-rest-api
- mkdir secret
- echo "univention" > secret/machine.secret
- echo "univention" > secret/ldap.secret
- echo -e "\e[0Ksection_start:`date +%s`:docker_compose_config[collapsed=true]\r\e[0KDocker Compose configuration"
- docker compose config udm-rest-api ldap-server test
- echo -e "\e[0Ksection_end:`date +%s`:docker_compose_config\r\e[0K"
- docker compose up --no-build --quiet-pull --wait --wait-timeout 60 udm-rest-api ldap-server
script:
- docker compose run --quiet-pull --rm test pytest -lvv tests/integration
after_script:
- docker compose down --volumes
push-image-external:
parallel:
matrix: *publish-matrix
check-debian-updates:
parallel:
matrix: *publish-matrix
variables:
TARGET_IMAGE: "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest"
...