-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
96 lines (84 loc) · 2.79 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
---
# SPDX-FileCopyrightText: 2023-2024 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only
include:
- project: "univention/customers/dataport/upx/common-ci"
ref: "v1.36.1"
file:
- "defaults/stages.yaml"
- "defaults/nubus-workflow.yaml"
- "jobs/lint-pre-commit.yaml"
- "jobs/lint-commit-messages.yaml"
- "jobs/semantic-release-env.yaml"
- "jobs/container-build-external.yaml"
- "jobs/check-debian-updates.yaml"
- project: "univention/dist/docker-services"
ref: "master"
file:
- "dind.yml"
.build-matrix: &build-matrix
- IMAGE_NAME: "directory-importer"
KANIKO_BUILD_CONTEXT: $CI_PROJECT_DIR
DOCKERFILE_PATH: "docker/directory-importer/Dockerfile"
- IMAGE_NAME: "testrunner"
KANIKO_BUILD_CONTEXT: $CI_PROJECT_DIR
DOCKERFILE_PATH: "docker/directory-importer/Dockerfile"
KANIKO_ARGS: "--target=test"
# Separate publish matrix to accomodate testrunner images
# that should not be mirrored to artifacts.software-univention.de
.publish-matrix: &publish-matrix
- IMAGE_NAME:
- "directory-importer"
container-build:
parallel:
matrix: *build-matrix
container-malware-scan:
parallel:
matrix: *publish-matrix
push-image-external:
parallel:
matrix: *publish-matrix
container-sign-external:
parallel:
matrix: *publish-matrix
check-debian-updates:
parallel:
matrix: *build-matrix
variables:
TARGET_IMAGE: "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest"
integration-test-directory-importer:
stage: test
extends: .dind
image: "${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:24.0.7"
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: "never"
- when: "on_success"
before_script:
- cd tests
# 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"
- echo -e "\e[0Ksection_start:`date +%s`:docker_compose_config[collapsed=true]\r\e[0KDocker Compose configuration"
- docker compose config 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 ldap-server udm-rest-api
script:
# - sleep 10
- docker compose run --quiet-pull test .venv/bin/python3 -m pytest
after_script:
- docker logs ldap-server >& ldap-server.log
- docker logs udm-rest-api >& udm-rest-api.log
- docker compose down --volumes
artifacts:
paths:
- ldap-server.log
- udm-rest-api.log
expire_in: "1 day"
when: "always"
expose_as: "docker compose server logs"
...