-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
70 lines (65 loc) · 1.78 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
# SPDX-FileCopyrightText: 2024 Gerald Wiese <[email protected]>
# SPDX-FileCopyrightText: 2024 Leibniz University Hannover
#
# SPDX-License-Identifier: GPL-3.0-or-later
stages:
- test
- release
test:
stage: test
image: docker:25.0.3
services:
- docker:25.0.3-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- docker version
- docker compose version
- apk add --no-cache python3 py3-pip
- python3 --version
- pip3 install --break-system-packages proteus
- |
cat <<EOF > ./connect.py
from proteus import config
print('Connecting to the fresh database')
conf = config.set_xmlrpc("http://admin:gnusolidario@docker:8080/health/")
print('Success')
print('Connecting to the local demo database')
conf = config.set_xmlrpc("http://admin:gnusolidario@docker:8080/ghdemo44/")
print('Success')
EOF
- pwd
- ls
- ls gnuhealth/
script:
- docker compose up -d --build
- docker ps
- sleep 120
- python3 connect.py
reuse:
stage: test
image:
name: fsfe/reuse:latest
entrypoint: [""]
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- reuse --include-submodules lint
release:
stage: release
image: docker:25.0.3
services:
- docker:25.0.3-dind
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
GIT_SUBMODULE_STRATEGY: recursive
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_USER_TOKEN
- RELEASE_VERSION=$(cat gnuhealth/VERSION)
- docker build -t ${CI_REGISTRY_IMAGE}:${RELEASE_VERSION} ./gnuhealth/
- docker push ${CI_REGISTRY_IMAGE}:${RELEASE_VERSION}
only:
- main