gitlab-projects-settings 5.3.1__tar.gz → 5.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gitlab_projects_settings-5.4.0/.gitignore +30 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.gitlab-ci.yml +375 -108
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.vscode/settings.json +1 -1
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/CHANGELOG.md +110 -0
- {gitlab_projects_settings-5.3.1/gitlab_projects_settings.egg-info → gitlab_projects_settings-5.4.0}/PKG-INFO +23 -9
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/README.md +22 -8
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/config/cliff.toml +1 -1
- gitlab_projects_settings-5.4.0/containers/build/Dockerfile +15 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/containers/codestyle/Dockerfile +1 -1
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/containers/deploy/Dockerfile +1 -1
- gitlab_projects_settings-5.4.0/containers/pages/Dockerfile +24 -0
- gitlab_projects_settings-5.4.0/containers/rehost/images.txt +6 -0
- gitlab_projects_settings-5.4.0/docs/.pages +9 -0
- gitlab_projects_settings-5.4.0/docs/assets/images/favicon.png +0 -0
- gitlab_projects_settings-5.4.0/docs/assets/scripts/mkdocs-exporter.js +47 -0
- gitlab_projects_settings-5.4.0/docs/assets/stylesheets/custom.css +49 -0
- gitlab_projects_settings-5.4.0/docs/assets/stylesheets/pdf.scss +165 -0
- gitlab_projects_settings-5.4.0/docs/prepare.sh +241 -0
- gitlab_projects_settings-5.4.0/docs/robots.txt +2 -0
- gitlab_projects_settings-5.4.0/docs/templates/covers/back.html.j2 +25 -0
- gitlab_projects_settings-5.4.0/docs/templates/covers/front.html.j2 +27 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0/gitlab_projects_settings.egg-info}/PKG-INFO +23 -9
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/SOURCES.txt +10 -0
- gitlab_projects_settings-5.4.0/mkdocs.yml +190 -0
- gitlab_projects_settings-5.4.0/requirements/pages.txt +9 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/sonar-project.properties +3 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/cli/entrypoint.py +22 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/cli/main.py +20 -5
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/features/gitlab.py +51 -3
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/package/bundle.py +1 -0
- gitlab_projects_settings-5.3.1/.gitignore +0 -27
- gitlab_projects_settings-5.3.1/containers/pages/Dockerfile +0 -12
- gitlab_projects_settings-5.3.1/docs/prepare.sh +0 -37
- gitlab_projects_settings-5.3.1/mkdocs.yml +0 -109
- gitlab_projects_settings-5.3.1/requirements/pages.txt +0 -2
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.coveragerc +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.cz.yaml +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.gitattributes +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.markdownlint.json +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.pre-commit-config.yaml +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.style.yapf +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/.vscode/extensions.json +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/LICENSE +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/containers/test-coverage-linux/Dockerfile +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/containers/test-coverage-windows/Dockerfile +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/containers/test-linux/Dockerfile +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/dependency_links.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/entry_points.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/requires.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/top_level.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/mypy.ini +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/requirements/build.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/requirements/coverage.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/requirements/deploy.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/requirements/quality.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/requirements/runtime.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/requirements/tests.txt +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/setup.cfg +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/setup.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/__init__.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/__main__.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/cli/__init__.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/features/__init__.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/package/__init__.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/package/settings.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/package/updates.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/package/version.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/prints/__init__.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/prints/boxes.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/prints/colors.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/prints/themes.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/system/__init__.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/system/platform.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/types/__init__.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/types/environments.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/types/gitlab.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/types/namespaces.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/src/types/strings.py +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/tests/arguments/test.sh +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/tests/colors/test.sh +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/tests/macos/test.sh +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/tests/settings/test.sh +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/tests/versions/test.sh +0 -0
- {gitlab_projects_settings-5.3.1 → gitlab_projects_settings-5.4.0}/tests/windows/test.sh +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Build intermediates
|
|
2
|
+
/build
|
|
3
|
+
|
|
4
|
+
# Compiled intermediates
|
|
5
|
+
*.pyc
|
|
6
|
+
__pycache__/
|
|
7
|
+
|
|
8
|
+
# Coverage intermediates
|
|
9
|
+
coverage-reports/
|
|
10
|
+
|
|
11
|
+
# Distribution intermediates
|
|
12
|
+
.eggs/
|
|
13
|
+
*.egg-info/
|
|
14
|
+
dist/
|
|
15
|
+
|
|
16
|
+
# Documentation intermediates
|
|
17
|
+
/docs/.serve.pid
|
|
18
|
+
/docs/about
|
|
19
|
+
/docs/assets/stylesheets/variables.scss
|
|
20
|
+
/docs/index.md
|
|
21
|
+
/public
|
|
22
|
+
|
|
23
|
+
# SonarQube intermediates
|
|
24
|
+
.scannerwork/
|
|
25
|
+
.sonar/
|
|
26
|
+
|
|
27
|
+
# Temporary intermediates
|
|
28
|
+
.*.swp
|
|
29
|
+
.tmp/
|
|
30
|
+
.tmp.*
|
|
@@ -5,6 +5,7 @@ include:
|
|
|
5
5
|
|
|
6
6
|
stages:
|
|
7
7
|
- development
|
|
8
|
+
- registry
|
|
8
9
|
- prepare
|
|
9
10
|
- build
|
|
10
11
|
- test
|
|
@@ -19,7 +20,10 @@ variables:
|
|
|
19
20
|
.local:
|
|
20
21
|
engine: docker,auto
|
|
21
22
|
real_paths: true
|
|
22
|
-
|
|
23
|
+
sockets: true
|
|
24
|
+
version: 11.0
|
|
25
|
+
volumes:
|
|
26
|
+
- ${HOME}/.docker/config.json:/root/.docker/config.json:ro
|
|
23
27
|
|
|
24
28
|
# =============================================================================
|
|
25
29
|
# Stage: development
|
|
@@ -48,22 +52,22 @@ changelog:
|
|
|
48
52
|
- |
|
|
49
53
|
echo -n " > Current commit : "
|
|
50
54
|
git describe --always
|
|
51
|
-
echo ''
|
|
55
|
+
echo ' '
|
|
52
56
|
if [ ! -z "${RELEASE_TAG:-}" ]; then
|
|
53
57
|
tag="${RELEASE_TAG}"
|
|
54
58
|
else
|
|
55
59
|
read -p " > Release tag : " -r tag
|
|
56
60
|
fi
|
|
57
|
-
echo ''
|
|
61
|
+
echo ' '
|
|
58
62
|
# Generate changelog
|
|
59
63
|
- |
|
|
60
64
|
git tag -f -m "${tag}" "${tag}"
|
|
61
65
|
./.tmp/git-cliff --no-exec --config ./config/cliff.toml --output ./CHANGELOG.md
|
|
62
66
|
sed -i "s#raw/[^/]*/docs#raw/${tag}/docs#g" ./README.md
|
|
63
67
|
git add -v ./CHANGELOG.md ./README.md
|
|
64
|
-
echo ''
|
|
68
|
+
echo ' '
|
|
65
69
|
git commit -m "docs(changelog): regenerate release tag changes history" -s
|
|
66
|
-
echo ''
|
|
70
|
+
echo ' '
|
|
67
71
|
# Create release tag
|
|
68
72
|
- git tag -f -m "${tag}" "${tag}"
|
|
69
73
|
rules:
|
|
@@ -76,9 +80,9 @@ hooks:
|
|
|
76
80
|
# Refresh configurations
|
|
77
81
|
- pre-commit-crocodile --configure
|
|
78
82
|
# Stash local changes
|
|
79
|
-
- echo ''
|
|
83
|
+
- echo ' '
|
|
80
84
|
- echo ' [INFO] Use "s" to split hunks and "y" to remove changes you do not want, "n" otherwise'
|
|
81
|
-
- echo ''
|
|
85
|
+
- echo ' '
|
|
82
86
|
- sleep 2
|
|
83
87
|
- git stash -p
|
|
84
88
|
# Stage changes
|
|
@@ -92,100 +96,277 @@ hooks:
|
|
|
92
96
|
rules:
|
|
93
97
|
- if: $CI_LOCAL
|
|
94
98
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
# =============================================================================
|
|
100
|
+
# Stage: registry
|
|
101
|
+
|
|
102
|
+
.registry:
|
|
103
|
+
image: docker:27-cli
|
|
104
|
+
services:
|
|
105
|
+
- docker:dind
|
|
106
|
+
before_script:
|
|
107
|
+
# Configure registry
|
|
108
|
+
- |
|
|
109
|
+
if [ ! -z "${CI_REGISTRY}" ]; then
|
|
110
|
+
docker login -u gitlab-ci-token -p "${CI_JOB_TOKEN}" "${CI_REGISTRY}"
|
|
111
|
+
fi
|
|
112
|
+
script:
|
|
113
|
+
# Prepare container image
|
|
114
|
+
- export base="${REGISTRY_HOST:?}/${REGISTRY_NAMESPACE:?}/${REGISTRY_PROJECT:?}/${BASEIMAGE_NAME}"
|
|
115
|
+
- export image="${REGISTRY_HOST:?}/${REGISTRY_NAMESPACE:?}/${REGISTRY_PROJECT:?}/${REGISTRY_PROJECT:?}:${CONTAINER_IMAGE_TAG:?}"
|
|
116
|
+
# Detect local image
|
|
117
|
+
- |
|
|
118
|
+
base_local='false'
|
|
119
|
+
image_local='false'
|
|
120
|
+
if docker images -q "${base}" 2>/dev/null | grep -q '.'; then
|
|
121
|
+
base_local='true'
|
|
122
|
+
fi
|
|
123
|
+
if docker images -q "${image}" 2>/dev/null | grep -q '.'; then
|
|
124
|
+
image_local='true'
|
|
125
|
+
fi
|
|
126
|
+
# Pull images
|
|
127
|
+
- |
|
|
128
|
+
echo ' '
|
|
129
|
+
echo " [INFO] Pull: ${image}"
|
|
130
|
+
echo ' '
|
|
131
|
+
docker pull "${base}" || true
|
|
132
|
+
docker pull "${image}" || true
|
|
133
|
+
# Build image
|
|
134
|
+
- |
|
|
135
|
+
docker buildx build \
|
|
136
|
+
--build-arg "IMAGE_BASE=${base}" \
|
|
137
|
+
--build-context 'requirements=./requirements' \
|
|
138
|
+
--cache-from "${image}" \
|
|
139
|
+
--pull \
|
|
140
|
+
--tag "${image}" \
|
|
141
|
+
"./containers/${CONTAINER_FOLDER}/"
|
|
142
|
+
# Cleanup intermediates
|
|
143
|
+
- docker system prune --force
|
|
144
|
+
# Show images
|
|
145
|
+
- docker images
|
|
146
|
+
# Push image
|
|
147
|
+
- |
|
|
148
|
+
if [ ! -z "${CI_COMMIT_TAG}" ] || [ "${CI_COMMIT_REF_NAME}" = "${CI_DEFAULT_BRANCH:-undefined}" ] || [ "${PUSH_IMAGES:-false}" = 'true' ]; then
|
|
149
|
+
echo ' '
|
|
150
|
+
echo " [INFO] Push: ${image}"
|
|
151
|
+
echo ' '
|
|
152
|
+
docker push "${image}"
|
|
153
|
+
fi
|
|
154
|
+
# Cleanup images
|
|
155
|
+
- |
|
|
156
|
+
if [ ! -z "${CI_LOCAL:-}" ] && [ "${base_local}" = 'false' ]; then
|
|
157
|
+
docker rmi "${base}" >/dev/null || true
|
|
158
|
+
fi
|
|
159
|
+
if [ ! -z "${CI_LOCAL:-}" ] && [ "${image_local}" = 'false' ]; then
|
|
160
|
+
docker rmi "${image}" >/dev/null || true
|
|
161
|
+
fi
|
|
162
|
+
after_script:
|
|
163
|
+
# Cleanup intermediates
|
|
164
|
+
- docker system prune --force
|
|
165
|
+
variables:
|
|
166
|
+
DOCKER_DRIVER: overlay2
|
|
167
|
+
|
|
168
|
+
registry:rehost:
|
|
169
|
+
stage: registry
|
|
170
|
+
extends:
|
|
171
|
+
- .registry
|
|
172
|
+
needs: []
|
|
98
173
|
script:
|
|
99
174
|
# Rehost standard images
|
|
100
175
|
- |
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
'sonarsource/sonar-scanner-cli:latest' \
|
|
106
|
-
'tobix/pywine:3.10' \
|
|
107
|
-
; do
|
|
108
|
-
base=$(echo "${base_rename}" | cut -d'|' -f1 | tr -d ' ')
|
|
109
|
-
rename=$(echo "${base_rename}" | cut -d'|' -f2 | tr -d ' ')
|
|
176
|
+
set +x
|
|
177
|
+
for base_rename in $(cat ./containers/rehost/images.txt); do
|
|
178
|
+
base=$(echo "${base_rename}" | cut -d'|' -f1)
|
|
179
|
+
rename=$(echo "${base_rename}" | cut -d'|' -f2)
|
|
110
180
|
image="${REGISTRY_HOST}/${REGISTRY_NAMESPACE}/${REGISTRY_PROJECT}/${rename:-${base}}"
|
|
111
181
|
if [ -z "${IMAGE}" ] || echo "${image}" | grep -q "${IMAGE}"; then
|
|
112
|
-
|
|
182
|
+
base_local='false'
|
|
183
|
+
image_local='false'
|
|
184
|
+
if docker images -q "${base}" 2>/dev/null | grep -q '.'; then
|
|
185
|
+
base_local='true'
|
|
186
|
+
fi
|
|
187
|
+
if docker images -q "${image}" 2>/dev/null | grep -q '.'; then
|
|
188
|
+
image_local='true'
|
|
189
|
+
fi
|
|
190
|
+
echo ' '
|
|
113
191
|
echo " [INFO] Pull: ${base}"
|
|
114
|
-
echo ''
|
|
192
|
+
echo ' '
|
|
115
193
|
docker pull "${base}" || true
|
|
116
194
|
docker tag "${base}" "${image}"
|
|
117
|
-
echo ''
|
|
195
|
+
echo ' '
|
|
118
196
|
echo " [INFO] Push: ${image}"
|
|
119
|
-
echo ''
|
|
120
|
-
docker push "${image}" || true
|
|
121
|
-
docker rmi "${base}" >/dev/null || true
|
|
122
|
-
fi
|
|
123
|
-
done
|
|
124
|
-
# Prepare project images
|
|
125
|
-
- |
|
|
126
|
-
for name_base_container in \
|
|
127
|
-
'build | python:3.12-alpine | build' \
|
|
128
|
-
'codestyle | python:3.12-alpine | codestyle' \
|
|
129
|
-
'deploy | python:3.12-alpine | deploy' \
|
|
130
|
-
'pages | python:3.12-alpine | pages' \
|
|
131
|
-
'test-coverage-linux | python:3.12 | test-coverage-linux' \
|
|
132
|
-
'test-coverage-windows | tobix/pywine:3.10 | test-coverage-windows' \
|
|
133
|
-
'test-oldest | python:3.8 | test-linux' \
|
|
134
|
-
'test-latest | python:3.12 | test-linux' \
|
|
135
|
-
; do
|
|
136
|
-
name=$(echo "${name_base_container}" | cut -d'|' -f1 | tr -d ' ')
|
|
137
|
-
base=$(echo "${name_base_container}" | cut -d'|' -f2 | tr -d ' ')
|
|
138
|
-
container=$(echo "${name_base_container}" | cut -d'|' -f3 | tr -d ' ')
|
|
139
|
-
base="${REGISTRY_HOST}/${REGISTRY_NAMESPACE}/${REGISTRY_PROJECT}/${base}"
|
|
140
|
-
image="${REGISTRY_HOST}/${REGISTRY_NAMESPACE}/${REGISTRY_PROJECT}/${REGISTRY_PROJECT}:${name}"
|
|
141
|
-
if [ -z "${IMAGE}" ] || echo "${image}" | grep -q "${IMAGE}"; then
|
|
142
|
-
echo ''
|
|
143
|
-
echo " [INFO] Pull: ${image}"
|
|
144
|
-
echo ''
|
|
145
|
-
docker pull "${base}" || true
|
|
146
|
-
docker pull "${image}" || true
|
|
147
|
-
docker build \
|
|
148
|
-
--build-arg "IMAGE_BASE=${base}" \
|
|
149
|
-
--build-context 'requirements=./requirements' \
|
|
150
|
-
--cache-from "${image}" \
|
|
151
|
-
--pull \
|
|
152
|
-
--tag "${image}" \
|
|
153
|
-
"./containers/${container}/"
|
|
154
|
-
echo ''
|
|
155
|
-
echo " [INFO] Push: ${image}"
|
|
156
|
-
echo ''
|
|
197
|
+
echo ' '
|
|
157
198
|
docker push "${image}" || true
|
|
199
|
+
if [ ! -z "${CI_LOCAL:-}" ] && [ "${base_local}" = 'false' ]; then
|
|
200
|
+
docker rmi "${base}" >/dev/null || true
|
|
201
|
+
fi
|
|
202
|
+
if [ ! -z "${CI_LOCAL:-}" ] && [ "${image_local}" = 'false' ]; then
|
|
203
|
+
docker rmi "${image}" >/dev/null || true
|
|
204
|
+
fi
|
|
158
205
|
fi
|
|
159
206
|
done
|
|
160
207
|
rules:
|
|
161
|
-
- if: $
|
|
208
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
209
|
+
changes:
|
|
210
|
+
- containers/rehost/images.txt
|
|
162
211
|
|
|
163
|
-
|
|
164
|
-
stage:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
ls -1 ./docs/* ./mkdocs.yml ./README.md | entr sh ./docs/prepare.sh &
|
|
176
|
-
echo -n "${!}" >./docs/.cache/.serve.pid
|
|
177
|
-
sleep 2
|
|
178
|
-
# Generate documentation
|
|
179
|
-
- |
|
|
180
|
-
network_ip=$(hostname -I | cut -d' ' -f1)
|
|
181
|
-
mkdocs serve --dev-addr "${network_ip}:8001" --clean --config-file ./mkdocs.yml --verbose || true
|
|
182
|
-
after_script:
|
|
183
|
-
# Cleanup documentation
|
|
184
|
-
- cat ./docs/.cache/.serve.pid | xargs -r kill >/dev/null 2>&1 || true
|
|
185
|
-
- rm -rf ./docs/.cache
|
|
212
|
+
registry:build:
|
|
213
|
+
stage: registry
|
|
214
|
+
extends:
|
|
215
|
+
- .registry
|
|
216
|
+
needs:
|
|
217
|
+
- job: registry:rehost
|
|
218
|
+
artifacts: false
|
|
219
|
+
optional: true
|
|
220
|
+
variables:
|
|
221
|
+
BASEIMAGE_NAME: 'python:3.12-alpine'
|
|
222
|
+
CONTAINER_FOLDER: build
|
|
223
|
+
CONTAINER_IMAGE_TAG: build
|
|
186
224
|
rules:
|
|
187
|
-
- if: $
|
|
188
|
-
|
|
225
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
226
|
+
changes:
|
|
227
|
+
- containers/build/Dockerfile
|
|
228
|
+
- containers/rehost/images.txt
|
|
229
|
+
- requirements/build.txt
|
|
230
|
+
- requirements/runtime.txt
|
|
231
|
+
|
|
232
|
+
registry:codestyle:
|
|
233
|
+
stage: registry
|
|
234
|
+
extends:
|
|
235
|
+
- .registry
|
|
236
|
+
needs:
|
|
237
|
+
- job: registry:rehost
|
|
238
|
+
artifacts: false
|
|
239
|
+
optional: true
|
|
240
|
+
variables:
|
|
241
|
+
BASEIMAGE_NAME: 'python:3.12-alpine'
|
|
242
|
+
CONTAINER_FOLDER: codestyle
|
|
243
|
+
CONTAINER_IMAGE_TAG: codestyle
|
|
244
|
+
rules:
|
|
245
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
246
|
+
changes:
|
|
247
|
+
- containers/codestyle/Dockerfile
|
|
248
|
+
- containers/rehost/images.txt
|
|
249
|
+
- requirements/quality.txt
|
|
250
|
+
- requirements/runtime.txt
|
|
251
|
+
- requirements/tests.txt
|
|
252
|
+
|
|
253
|
+
registry:deploy:
|
|
254
|
+
stage: registry
|
|
255
|
+
extends:
|
|
256
|
+
- .registry
|
|
257
|
+
needs:
|
|
258
|
+
- job: registry:rehost
|
|
259
|
+
artifacts: false
|
|
260
|
+
optional: true
|
|
261
|
+
variables:
|
|
262
|
+
BASEIMAGE_NAME: 'python:3.12-alpine'
|
|
263
|
+
CONTAINER_FOLDER: deploy
|
|
264
|
+
CONTAINER_IMAGE_TAG: deploy
|
|
265
|
+
rules:
|
|
266
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
267
|
+
changes:
|
|
268
|
+
- containers/deploy/Dockerfile
|
|
269
|
+
- containers/rehost/images.txt
|
|
270
|
+
- requirements/deploy.txt
|
|
271
|
+
|
|
272
|
+
registry:pages:
|
|
273
|
+
stage: registry
|
|
274
|
+
extends:
|
|
275
|
+
- .registry
|
|
276
|
+
needs:
|
|
277
|
+
- job: registry:rehost
|
|
278
|
+
artifacts: false
|
|
279
|
+
optional: true
|
|
280
|
+
variables:
|
|
281
|
+
BASEIMAGE_NAME: 'python:3.12-slim'
|
|
282
|
+
CONTAINER_FOLDER: pages
|
|
283
|
+
CONTAINER_IMAGE_TAG: pages
|
|
284
|
+
rules:
|
|
285
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
286
|
+
changes:
|
|
287
|
+
- containers/pages/Dockerfile
|
|
288
|
+
- containers/rehost/images.txt
|
|
289
|
+
- requirements/pages.txt
|
|
290
|
+
|
|
291
|
+
registry:test-coverage-linux:
|
|
292
|
+
stage: registry
|
|
293
|
+
extends:
|
|
294
|
+
- .registry
|
|
295
|
+
needs:
|
|
296
|
+
- job: registry:rehost
|
|
297
|
+
artifacts: false
|
|
298
|
+
optional: true
|
|
299
|
+
variables:
|
|
300
|
+
BASEIMAGE_NAME: 'python:3.12'
|
|
301
|
+
CONTAINER_FOLDER: test-coverage-linux
|
|
302
|
+
CONTAINER_IMAGE_TAG: test-coverage-linux
|
|
303
|
+
rules:
|
|
304
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
305
|
+
changes:
|
|
306
|
+
- containers/rehost/images.txt
|
|
307
|
+
- containers/test-coverage-linux/Dockerfile
|
|
308
|
+
- requirements/coverage.txt
|
|
309
|
+
- requirements/runtime.txt
|
|
310
|
+
- requirements/tests.txt
|
|
311
|
+
|
|
312
|
+
registry:test-coverage-windows:
|
|
313
|
+
stage: registry
|
|
314
|
+
extends:
|
|
315
|
+
- .registry
|
|
316
|
+
needs:
|
|
317
|
+
- job: registry:rehost
|
|
318
|
+
artifacts: false
|
|
319
|
+
optional: true
|
|
320
|
+
variables:
|
|
321
|
+
BASEIMAGE_NAME: 'tobix/pywine:3.10'
|
|
322
|
+
CONTAINER_FOLDER: test-coverage-windows
|
|
323
|
+
CONTAINER_IMAGE_TAG: test-coverage-windows
|
|
324
|
+
rules:
|
|
325
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
326
|
+
changes:
|
|
327
|
+
- containers/rehost/images.txt
|
|
328
|
+
- containers/test-coverage-windows/Dockerfile
|
|
329
|
+
- requirements/coverage.txt
|
|
330
|
+
- requirements/runtime.txt
|
|
331
|
+
- requirements/tests.txt
|
|
332
|
+
|
|
333
|
+
registry:test-oldest:
|
|
334
|
+
stage: registry
|
|
335
|
+
extends:
|
|
336
|
+
- .registry
|
|
337
|
+
needs:
|
|
338
|
+
- job: registry:rehost
|
|
339
|
+
artifacts: false
|
|
340
|
+
optional: true
|
|
341
|
+
variables:
|
|
342
|
+
BASEIMAGE_NAME: 'python:3.8'
|
|
343
|
+
CONTAINER_FOLDER: test-linux
|
|
344
|
+
CONTAINER_IMAGE_TAG: test-oldest
|
|
345
|
+
rules:
|
|
346
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
347
|
+
changes:
|
|
348
|
+
- containers/rehost/images.txt
|
|
349
|
+
- containers/test-linux/Dockerfile
|
|
350
|
+
- requirements/tests.txt
|
|
351
|
+
|
|
352
|
+
registry:test-latest:
|
|
353
|
+
stage: registry
|
|
354
|
+
extends:
|
|
355
|
+
- .registry
|
|
356
|
+
needs:
|
|
357
|
+
- job: registry:rehost
|
|
358
|
+
artifacts: false
|
|
359
|
+
optional: true
|
|
360
|
+
variables:
|
|
361
|
+
BASEIMAGE_NAME: 'python:3.12'
|
|
362
|
+
CONTAINER_FOLDER: test-linux
|
|
363
|
+
CONTAINER_IMAGE_TAG: test-latest
|
|
364
|
+
rules:
|
|
365
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
366
|
+
changes:
|
|
367
|
+
- containers/rehost/images.txt
|
|
368
|
+
- containers/test-linux/Dockerfile
|
|
369
|
+
- requirements/tests.txt
|
|
189
370
|
|
|
190
371
|
# =============================================================================
|
|
191
372
|
# Stage: prepare
|
|
@@ -193,10 +374,13 @@ serve:
|
|
|
193
374
|
codestyle:
|
|
194
375
|
stage: prepare
|
|
195
376
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:codestyle
|
|
196
|
-
needs:
|
|
377
|
+
needs:
|
|
378
|
+
- job: registry:codestyle
|
|
379
|
+
artifacts: false
|
|
380
|
+
optional: true
|
|
197
381
|
script:
|
|
198
382
|
- yapf -i ./src/*.py ./src/*/*.py ./setup.py
|
|
199
|
-
- echo '' && git diff --name-status
|
|
383
|
+
- echo ' ' && git diff --name-status
|
|
200
384
|
- |
|
|
201
385
|
if [ -z "${CI_LOCAL:-}" ] || [ ! -z "${PRE_COMMIT}" ]; then
|
|
202
386
|
git diff --quiet
|
|
@@ -214,7 +398,10 @@ codestyle:
|
|
|
214
398
|
lint:
|
|
215
399
|
stage: prepare
|
|
216
400
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:codestyle
|
|
217
|
-
needs:
|
|
401
|
+
needs:
|
|
402
|
+
- job: registry:codestyle
|
|
403
|
+
artifacts: false
|
|
404
|
+
optional: true
|
|
218
405
|
script:
|
|
219
406
|
- pylint --errors-only ./src/ ./setup.py
|
|
220
407
|
- pylint --disable=missing-docstring --load-plugins=pylint.extensions.no_self_use ./src/ ./setup.py
|
|
@@ -231,7 +418,10 @@ lint:
|
|
|
231
418
|
typings:
|
|
232
419
|
stage: prepare
|
|
233
420
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:codestyle
|
|
234
|
-
needs:
|
|
421
|
+
needs:
|
|
422
|
+
- job: registry:codestyle
|
|
423
|
+
artifacts: false
|
|
424
|
+
optional: true
|
|
235
425
|
variables:
|
|
236
426
|
MYPY_CACHE_DIR: /dev/null
|
|
237
427
|
MYPY_FORCE_COLOR: 1
|
|
@@ -261,6 +451,9 @@ build:
|
|
|
261
451
|
stage: build
|
|
262
452
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:build
|
|
263
453
|
needs:
|
|
454
|
+
- job: registry:build
|
|
455
|
+
artifacts: false
|
|
456
|
+
optional: true
|
|
264
457
|
- job: codestyle
|
|
265
458
|
artifacts: false
|
|
266
459
|
optional: true
|
|
@@ -337,7 +530,7 @@ readme:
|
|
|
337
530
|
}; /${tail}/p; d }" ./README.md | head -n 100
|
|
338
531
|
- rm -f ./.tmp/README.help.tmp
|
|
339
532
|
- |
|
|
340
|
-
git -c color.diff=always --no-pager diff ./README.md | grep --color=never '.' && echo ''
|
|
533
|
+
git -c color.diff=always --no-pager diff ./README.md | grep --color=never '.' && echo ' '
|
|
341
534
|
echo ' > README: Updated successfully'
|
|
342
535
|
git diff --quiet ./README.md
|
|
343
536
|
rules:
|
|
@@ -379,16 +572,16 @@ readme:
|
|
|
379
572
|
script:
|
|
380
573
|
# Prepare tests
|
|
381
574
|
- export SUITE=$(echo "${SUITE}" | sed 's/,/\\|/g')
|
|
382
|
-
- if [ ! -z "${SUITE}" ]; then ls -1d ./tests/* | grep -q "\/\(${SUITE}\)" || (set +x; echo ''; echo -e '\033[1;31m[ERROR] The requested SUITE filter does not match any suite\033[0m'; echo ''; exit 1); fi
|
|
575
|
+
- if [ ! -z "${SUITE}" ]; then ls -1d ./tests/* | grep -q "\/\(${SUITE}\)" || (set +x; echo ' '; echo -e '\033[1;31m[ERROR] The requested SUITE filter does not match any suite\033[0m'; echo ' '; exit 1); fi
|
|
383
576
|
# Run tests
|
|
384
577
|
- for path in $(ls -1d ./tests/* | grep "\/\(${SUITE}\)"); do (cd "${path}/" && time sh ./test.sh 2>&1); done
|
|
385
578
|
# Finish tests
|
|
386
579
|
- |
|
|
387
580
|
(
|
|
388
581
|
set +x
|
|
389
|
-
echo ''
|
|
582
|
+
echo ' '
|
|
390
583
|
echo ' [INFO] Unit tests finished successfully'
|
|
391
|
-
echo ''
|
|
584
|
+
echo ' '
|
|
392
585
|
)
|
|
393
586
|
|
|
394
587
|
.coverage-template:
|
|
@@ -448,7 +641,10 @@ coverage:linux:
|
|
|
448
641
|
extends:
|
|
449
642
|
- .coverage-template
|
|
450
643
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:test-coverage-linux
|
|
451
|
-
needs:
|
|
644
|
+
needs:
|
|
645
|
+
- job: registry:test-coverage-linux
|
|
646
|
+
artifacts: false
|
|
647
|
+
optional: true
|
|
452
648
|
variables:
|
|
453
649
|
COVERAGE_FILE: ${CI_PROJECT_DIR}/coverage-reports/.coverage-linux
|
|
454
650
|
COVERAGE_XML: ${CI_PROJECT_DIR}/coverage-reports/coverage-linux.xml
|
|
@@ -459,7 +655,10 @@ coverage:windows:
|
|
|
459
655
|
extends:
|
|
460
656
|
- .coverage-template
|
|
461
657
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:test-coverage-windows
|
|
462
|
-
needs:
|
|
658
|
+
needs:
|
|
659
|
+
- job: registry:test-coverage-windows
|
|
660
|
+
artifacts: false
|
|
661
|
+
optional: true
|
|
463
662
|
variables:
|
|
464
663
|
COVERAGE_FILE: ${CI_PROJECT_DIR}/coverage-reports/.coverage-windows
|
|
465
664
|
COVERAGE_XML: ${CI_PROJECT_DIR}/coverage-reports/coverage-windows.xml
|
|
@@ -496,6 +695,9 @@ sonarcloud:
|
|
|
496
695
|
name: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/sonarsource/sonar-scanner-cli:latest
|
|
497
696
|
entrypoint: ['']
|
|
498
697
|
needs:
|
|
698
|
+
- job: registry:rehost
|
|
699
|
+
artifacts: false
|
|
700
|
+
optional: true
|
|
499
701
|
- job: coverage:linux
|
|
500
702
|
- job: coverage:windows
|
|
501
703
|
variables:
|
|
@@ -509,6 +711,15 @@ sonarcloud:
|
|
|
509
711
|
# Configure Git securities
|
|
510
712
|
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
|
511
713
|
script:
|
|
714
|
+
# Prevent local usage
|
|
715
|
+
- |
|
|
716
|
+
if [ ! -z "${CI_LOCAL:-}" ] && [ -z "${SONAR_HOST_URL:-}" ]; then
|
|
717
|
+
set +x
|
|
718
|
+
echo ' '
|
|
719
|
+
echo ' [ERROR] SonarCloud quality job is meant for CI executions only...'
|
|
720
|
+
echo ' '
|
|
721
|
+
exit 1
|
|
722
|
+
fi
|
|
512
723
|
# Scan with SonarCloud
|
|
513
724
|
- sonar-scanner -Dsonar.projectVersion=$(git describe --always) -Dsonar.branch.name=${CI_COMMIT_REF_NAME}
|
|
514
725
|
rules:
|
|
@@ -521,6 +732,8 @@ sonarcloud:
|
|
|
521
732
|
when: always
|
|
522
733
|
- if: $CI_COMMIT_REF_NAME == "main"
|
|
523
734
|
when: always
|
|
735
|
+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
|
736
|
+
when: always
|
|
524
737
|
- when: never
|
|
525
738
|
allow_failure: true
|
|
526
739
|
|
|
@@ -531,6 +744,9 @@ deploy:release:
|
|
|
531
744
|
stage: deploy
|
|
532
745
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:deploy
|
|
533
746
|
needs:
|
|
747
|
+
- job: registry:deploy
|
|
748
|
+
artifacts: false
|
|
749
|
+
optional: true
|
|
534
750
|
- job: build
|
|
535
751
|
- job: coverage:linux
|
|
536
752
|
artifacts: false
|
|
@@ -578,6 +794,9 @@ deploy:trial:
|
|
|
578
794
|
stage: deploy
|
|
579
795
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:deploy
|
|
580
796
|
needs:
|
|
797
|
+
- job: registry:deploy
|
|
798
|
+
artifacts: false
|
|
799
|
+
optional: true
|
|
581
800
|
- job: build
|
|
582
801
|
- job: coverage:linux
|
|
583
802
|
artifacts: false
|
|
@@ -596,10 +815,24 @@ deploy:trial:
|
|
|
596
815
|
- if: $CI_LOCAL
|
|
597
816
|
when: manual
|
|
598
817
|
|
|
818
|
+
.pages:
|
|
819
|
+
rules:
|
|
820
|
+
changes:
|
|
821
|
+
- '.gitlab-ci.yml'
|
|
822
|
+
- 'CHANGELOG.md'
|
|
823
|
+
- 'mkdocs.yml'
|
|
824
|
+
- 'LICENSE'
|
|
825
|
+
- 'README.md'
|
|
826
|
+
- 'docs/**/*'
|
|
827
|
+
- 'requirements/**/*'
|
|
828
|
+
|
|
599
829
|
pages:
|
|
600
830
|
stage: deploy
|
|
601
831
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:pages
|
|
602
832
|
needs:
|
|
833
|
+
- job: registry:pages
|
|
834
|
+
artifacts: false
|
|
835
|
+
optional: true
|
|
603
836
|
- job: build
|
|
604
837
|
artifacts: false
|
|
605
838
|
optional: true
|
|
@@ -615,25 +848,59 @@ pages:
|
|
|
615
848
|
- job: py3.12
|
|
616
849
|
artifacts: false
|
|
617
850
|
optional: true
|
|
851
|
+
variables:
|
|
852
|
+
CI_LOCAL_NETWORK: 'host'
|
|
853
|
+
MKDOCS_EXPORTER_PDF_ENABLED: 'true'
|
|
618
854
|
script:
|
|
855
|
+
# Fetch all tags
|
|
856
|
+
- |
|
|
857
|
+
if [ -z "${CI_LOCAL:-}" ]; then
|
|
858
|
+
git fetch --tags --unshallow || true
|
|
859
|
+
fi
|
|
619
860
|
# Prepare documentation
|
|
620
|
-
-
|
|
861
|
+
- |
|
|
862
|
+
if [ ! -z "${CI_LOCAL:-}" ]; then
|
|
863
|
+
find ./config/* ./docs/* ./mkdocs.yml ./README.md -not -path ./docs/assets/stylesheets/variables.scss -type f | entr -n sh ./docs/prepare.sh &
|
|
864
|
+
echo -n "${!}" >./docs/.serve.pid
|
|
865
|
+
sleep 2
|
|
866
|
+
else
|
|
867
|
+
sh ./docs/prepare.sh
|
|
868
|
+
fi
|
|
621
869
|
# Generate documentation
|
|
622
|
-
-
|
|
870
|
+
- |
|
|
871
|
+
if [ ! -z "${CI_LOCAL:-}" ]; then
|
|
872
|
+
network_ip=$(hostname -I | cut -d' ' -f1)
|
|
873
|
+
mkdocs serve --dev-addr "${network_ip}:8001" --clean --config-file ./mkdocs.yml --verbose
|
|
874
|
+
else
|
|
875
|
+
mkdocs build --clean --config-file ./mkdocs.yml --verbose
|
|
876
|
+
fi
|
|
623
877
|
after_script:
|
|
624
878
|
# Cleanup documentation
|
|
625
|
-
-
|
|
879
|
+
- |
|
|
880
|
+
if [ -e ./docs/.serve.pid ]; then
|
|
881
|
+
cat ./docs/.serve.pid | xargs -r kill >/dev/null 2>&1 || true
|
|
882
|
+
fi
|
|
883
|
+
- sh ./docs/prepare.sh --clean
|
|
626
884
|
artifacts:
|
|
627
885
|
expire_in: 1 hour
|
|
628
886
|
paths:
|
|
629
887
|
- public
|
|
630
888
|
rules:
|
|
631
|
-
- if: $CI_COMMIT_REF_NAME ==
|
|
632
|
-
changes:
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
889
|
+
- if: $CI_COMMIT_TAG || $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
890
|
+
changes: !reference [.pages, rules, changes]
|
|
891
|
+
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED
|
|
892
|
+
changes: !reference [.pages, rules, changes]
|
|
893
|
+
when: manual
|
|
894
|
+
|
|
895
|
+
pdf:
|
|
896
|
+
extends:
|
|
897
|
+
- pages
|
|
898
|
+
stage: deploy
|
|
899
|
+
artifacts:
|
|
900
|
+
expire_in: 1 hour
|
|
901
|
+
paths:
|
|
902
|
+
- public/documentation.pdf
|
|
903
|
+
rules:
|
|
904
|
+
- if: $CI_COMMIT_TAG
|
|
905
|
+
- if: $CI_COMMIT_BRANCH
|
|
906
|
+
changes: !reference [.pages, rules, changes]
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"workbench.enableExperiments": false,
|
|
31
31
|
"yaml.format.singleQuote": true,
|
|
32
32
|
"[markdown]": {
|
|
33
|
-
"editor.defaultFormatter": "
|
|
33
|
+
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
|
|
34
34
|
},
|
|
35
35
|
"[yaml]": {
|
|
36
36
|
"editor.defaultFormatter": "redhat.vscode-yaml"
|