gitlab-projects-settings 5.3.0__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.3.0 → gitlab_projects_settings-5.4.0}/.cz.yaml +3 -3
- gitlab_projects_settings-5.4.0/.gitignore +30 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/.gitlab-ci.yml +412 -72
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/.pre-commit-config.yaml +27 -25
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/.vscode/settings.json +1 -1
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/CHANGELOG.md +141 -0
- {gitlab_projects_settings-5.3.0/gitlab_projects_settings.egg-info → gitlab_projects_settings-5.4.0}/PKG-INFO +30 -10
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/README.md +28 -9
- {gitlab_projects_settings-5.3.0 → 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.0 → gitlab_projects_settings-5.4.0}/containers/codestyle/Dockerfile +1 -1
- {gitlab_projects_settings-5.3.0 → 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.0 → gitlab_projects_settings-5.4.0/gitlab_projects_settings.egg-info}/PKG-INFO +30 -10
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/SOURCES.txt +14 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/requires.txt +1 -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.0 → gitlab_projects_settings-5.4.0}/requirements/runtime.txt +1 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/sonar-project.properties +3 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/cli/entrypoint.py +22 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/cli/main.py +20 -5
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/features/gitlab.py +51 -3
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/package/bundle.py +1 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/package/updates.py +2 -2
- gitlab_projects_settings-5.3.0/.gitignore +0 -23
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/.coveragerc +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/.gitattributes +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/.markdownlint.json +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/.style.yapf +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/.vscode/extensions.json +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/LICENSE +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/containers/test-coverage-linux/Dockerfile +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/containers/test-coverage-windows/Dockerfile +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/containers/test-linux/Dockerfile +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/dependency_links.txt +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/entry_points.txt +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/gitlab_projects_settings.egg-info/top_level.txt +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/mypy.ini +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/requirements/build.txt +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/requirements/coverage.txt +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/requirements/deploy.txt +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/requirements/quality.txt +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/requirements/tests.txt +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/setup.cfg +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/setup.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/__init__.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/__main__.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/cli/__init__.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/features/__init__.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/package/__init__.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/package/settings.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/package/version.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/prints/__init__.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/prints/boxes.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/prints/colors.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/prints/themes.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/system/__init__.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/system/platform.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/types/__init__.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/types/environments.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/types/gitlab.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/types/namespaces.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/src/types/strings.py +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/tests/arguments/test.sh +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/tests/colors/test.sh +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/tests/macos/test.sh +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/tests/settings/test.sh +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/tests/versions/test.sh +0 -0
- {gitlab_projects_settings-5.3.0 → gitlab_projects_settings-5.4.0}/tests/windows/test.sh +0 -0
|
@@ -133,18 +133,18 @@ commitizen:
|
|
|
133
133
|
- type: input
|
|
134
134
|
name: scope
|
|
135
135
|
message: 'Scope of the change :'
|
|
136
|
-
filter: '
|
|
136
|
+
filter: 'required_validator_scope'
|
|
137
137
|
default: ''
|
|
138
138
|
- type: input
|
|
139
139
|
name: subject
|
|
140
140
|
message: 'Title of the commit (starting in lower case and without period) :'
|
|
141
|
-
filter: '
|
|
141
|
+
filter: 'required_validator_title_strip'
|
|
142
142
|
default: ''
|
|
143
143
|
- type: input
|
|
144
144
|
name: body
|
|
145
145
|
message: 'Additional contextual message (Empty to skip) :'
|
|
146
146
|
default: 'Issue: #...'
|
|
147
|
-
filter: '
|
|
147
|
+
filter: 'multiple_line_breaker'
|
|
148
148
|
- type: input
|
|
149
149
|
name: footer
|
|
150
150
|
message: 'Footer information and references (Empty to skip) :'
|
|
@@ -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.*
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
include:
|
|
2
|
-
- component: gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commits@
|
|
2
|
+
- component: gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commits@3.0.0
|
|
3
3
|
inputs:
|
|
4
4
|
stage: prepare
|
|
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,72 +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
|
-
'test-coverage-linux | python:3.12 | test-coverage-linux' \
|
|
131
|
-
'test-coverage-windows | tobix/pywine:3.10 | test-coverage-windows' \
|
|
132
|
-
'test-oldest | python:3.8 | test-linux' \
|
|
133
|
-
'test-latest | python:3.12 | test-linux' \
|
|
134
|
-
; do
|
|
135
|
-
name=$(echo "${name_base_container}" | cut -d'|' -f1 | tr -d ' ')
|
|
136
|
-
base=$(echo "${name_base_container}" | cut -d'|' -f2 | tr -d ' ')
|
|
137
|
-
container=$(echo "${name_base_container}" | cut -d'|' -f3 | tr -d ' ')
|
|
138
|
-
base="${REGISTRY_HOST}/${REGISTRY_NAMESPACE}/${REGISTRY_PROJECT}/${base}"
|
|
139
|
-
image="${REGISTRY_HOST}/${REGISTRY_NAMESPACE}/${REGISTRY_PROJECT}/${REGISTRY_PROJECT}:${name}"
|
|
140
|
-
if [ -z "${IMAGE}" ] || echo "${image}" | grep -q "${IMAGE}"; then
|
|
141
|
-
echo ''
|
|
142
|
-
echo " [INFO] Pull: ${image}"
|
|
143
|
-
echo ''
|
|
144
|
-
docker pull "${base}" || true
|
|
145
|
-
docker pull "${image}" || true
|
|
146
|
-
docker build \
|
|
147
|
-
--build-arg "IMAGE_BASE=${base}" \
|
|
148
|
-
--build-context 'requirements=./requirements' \
|
|
149
|
-
--cache-from "${image}" \
|
|
150
|
-
--pull \
|
|
151
|
-
--tag "${image}" \
|
|
152
|
-
"./containers/${container}/"
|
|
153
|
-
echo ''
|
|
154
|
-
echo " [INFO] Push: ${image}"
|
|
155
|
-
echo ''
|
|
197
|
+
echo ' '
|
|
156
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
|
|
157
205
|
fi
|
|
158
206
|
done
|
|
159
207
|
rules:
|
|
160
|
-
- if: $
|
|
208
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
209
|
+
changes:
|
|
210
|
+
- containers/rehost/images.txt
|
|
211
|
+
|
|
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
|
|
224
|
+
rules:
|
|
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
|
|
161
370
|
|
|
162
371
|
# =============================================================================
|
|
163
372
|
# Stage: prepare
|
|
@@ -165,11 +374,17 @@ images:
|
|
|
165
374
|
codestyle:
|
|
166
375
|
stage: prepare
|
|
167
376
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:codestyle
|
|
168
|
-
needs:
|
|
377
|
+
needs:
|
|
378
|
+
- job: registry:codestyle
|
|
379
|
+
artifacts: false
|
|
380
|
+
optional: true
|
|
169
381
|
script:
|
|
170
382
|
- yapf -i ./src/*.py ./src/*/*.py ./setup.py
|
|
171
|
-
- echo '' && git diff --name-status
|
|
172
|
-
-
|
|
383
|
+
- echo ' ' && git diff --name-status
|
|
384
|
+
- |
|
|
385
|
+
if [ -z "${CI_LOCAL:-}" ] || [ ! -z "${PRE_COMMIT}" ]; then
|
|
386
|
+
git diff --quiet
|
|
387
|
+
fi
|
|
173
388
|
rules:
|
|
174
389
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
175
390
|
changes:
|
|
@@ -183,7 +398,10 @@ codestyle:
|
|
|
183
398
|
lint:
|
|
184
399
|
stage: prepare
|
|
185
400
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:codestyle
|
|
186
|
-
needs:
|
|
401
|
+
needs:
|
|
402
|
+
- job: registry:codestyle
|
|
403
|
+
artifacts: false
|
|
404
|
+
optional: true
|
|
187
405
|
script:
|
|
188
406
|
- pylint --errors-only ./src/ ./setup.py
|
|
189
407
|
- pylint --disable=missing-docstring --load-plugins=pylint.extensions.no_self_use ./src/ ./setup.py
|
|
@@ -200,7 +418,10 @@ lint:
|
|
|
200
418
|
typings:
|
|
201
419
|
stage: prepare
|
|
202
420
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:codestyle
|
|
203
|
-
needs:
|
|
421
|
+
needs:
|
|
422
|
+
- job: registry:codestyle
|
|
423
|
+
artifacts: false
|
|
424
|
+
optional: true
|
|
204
425
|
variables:
|
|
205
426
|
MYPY_CACHE_DIR: /dev/null
|
|
206
427
|
MYPY_FORCE_COLOR: 1
|
|
@@ -230,6 +451,9 @@ build:
|
|
|
230
451
|
stage: build
|
|
231
452
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:build
|
|
232
453
|
needs:
|
|
454
|
+
- job: registry:build
|
|
455
|
+
artifacts: false
|
|
456
|
+
optional: true
|
|
233
457
|
- job: codestyle
|
|
234
458
|
artifacts: false
|
|
235
459
|
optional: true
|
|
@@ -306,7 +530,7 @@ readme:
|
|
|
306
530
|
}; /${tail}/p; d }" ./README.md | head -n 100
|
|
307
531
|
- rm -f ./.tmp/README.help.tmp
|
|
308
532
|
- |
|
|
309
|
-
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 ' '
|
|
310
534
|
echo ' > README: Updated successfully'
|
|
311
535
|
git diff --quiet ./README.md
|
|
312
536
|
rules:
|
|
@@ -348,16 +572,16 @@ readme:
|
|
|
348
572
|
script:
|
|
349
573
|
# Prepare tests
|
|
350
574
|
- export SUITE=$(echo "${SUITE}" | sed 's/,/\\|/g')
|
|
351
|
-
- 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
|
|
352
576
|
# Run tests
|
|
353
577
|
- for path in $(ls -1d ./tests/* | grep "\/\(${SUITE}\)"); do (cd "${path}/" && time sh ./test.sh 2>&1); done
|
|
354
578
|
# Finish tests
|
|
355
579
|
- |
|
|
356
580
|
(
|
|
357
581
|
set +x
|
|
358
|
-
echo ''
|
|
582
|
+
echo ' '
|
|
359
583
|
echo ' [INFO] Unit tests finished successfully'
|
|
360
|
-
echo ''
|
|
584
|
+
echo ' '
|
|
361
585
|
)
|
|
362
586
|
|
|
363
587
|
.coverage-template:
|
|
@@ -417,7 +641,10 @@ coverage:linux:
|
|
|
417
641
|
extends:
|
|
418
642
|
- .coverage-template
|
|
419
643
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:test-coverage-linux
|
|
420
|
-
needs:
|
|
644
|
+
needs:
|
|
645
|
+
- job: registry:test-coverage-linux
|
|
646
|
+
artifacts: false
|
|
647
|
+
optional: true
|
|
421
648
|
variables:
|
|
422
649
|
COVERAGE_FILE: ${CI_PROJECT_DIR}/coverage-reports/.coverage-linux
|
|
423
650
|
COVERAGE_XML: ${CI_PROJECT_DIR}/coverage-reports/coverage-linux.xml
|
|
@@ -428,7 +655,10 @@ coverage:windows:
|
|
|
428
655
|
extends:
|
|
429
656
|
- .coverage-template
|
|
430
657
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:test-coverage-windows
|
|
431
|
-
needs:
|
|
658
|
+
needs:
|
|
659
|
+
- job: registry:test-coverage-windows
|
|
660
|
+
artifacts: false
|
|
661
|
+
optional: true
|
|
432
662
|
variables:
|
|
433
663
|
COVERAGE_FILE: ${CI_PROJECT_DIR}/coverage-reports/.coverage-windows
|
|
434
664
|
COVERAGE_XML: ${CI_PROJECT_DIR}/coverage-reports/coverage-windows.xml
|
|
@@ -465,6 +695,9 @@ sonarcloud:
|
|
|
465
695
|
name: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/sonarsource/sonar-scanner-cli:latest
|
|
466
696
|
entrypoint: ['']
|
|
467
697
|
needs:
|
|
698
|
+
- job: registry:rehost
|
|
699
|
+
artifacts: false
|
|
700
|
+
optional: true
|
|
468
701
|
- job: coverage:linux
|
|
469
702
|
- job: coverage:windows
|
|
470
703
|
variables:
|
|
@@ -478,6 +711,15 @@ sonarcloud:
|
|
|
478
711
|
# Configure Git securities
|
|
479
712
|
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
|
480
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
|
|
481
723
|
# Scan with SonarCloud
|
|
482
724
|
- sonar-scanner -Dsonar.projectVersion=$(git describe --always) -Dsonar.branch.name=${CI_COMMIT_REF_NAME}
|
|
483
725
|
rules:
|
|
@@ -490,6 +732,8 @@ sonarcloud:
|
|
|
490
732
|
when: always
|
|
491
733
|
- if: $CI_COMMIT_REF_NAME == "main"
|
|
492
734
|
when: always
|
|
735
|
+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
|
736
|
+
when: always
|
|
493
737
|
- when: never
|
|
494
738
|
allow_failure: true
|
|
495
739
|
|
|
@@ -500,6 +744,9 @@ deploy:release:
|
|
|
500
744
|
stage: deploy
|
|
501
745
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:deploy
|
|
502
746
|
needs:
|
|
747
|
+
- job: registry:deploy
|
|
748
|
+
artifacts: false
|
|
749
|
+
optional: true
|
|
503
750
|
- job: build
|
|
504
751
|
- job: coverage:linux
|
|
505
752
|
artifacts: false
|
|
@@ -547,6 +794,9 @@ deploy:trial:
|
|
|
547
794
|
stage: deploy
|
|
548
795
|
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:deploy
|
|
549
796
|
needs:
|
|
797
|
+
- job: registry:deploy
|
|
798
|
+
artifacts: false
|
|
799
|
+
optional: true
|
|
550
800
|
- job: build
|
|
551
801
|
- job: coverage:linux
|
|
552
802
|
artifacts: false
|
|
@@ -564,3 +814,93 @@ deploy:trial:
|
|
|
564
814
|
rules:
|
|
565
815
|
- if: $CI_LOCAL
|
|
566
816
|
when: manual
|
|
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
|
+
|
|
829
|
+
pages:
|
|
830
|
+
stage: deploy
|
|
831
|
+
image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:pages
|
|
832
|
+
needs:
|
|
833
|
+
- job: registry:pages
|
|
834
|
+
artifacts: false
|
|
835
|
+
optional: true
|
|
836
|
+
- job: build
|
|
837
|
+
artifacts: false
|
|
838
|
+
optional: true
|
|
839
|
+
- job: coverage:linux
|
|
840
|
+
artifacts: false
|
|
841
|
+
optional: true
|
|
842
|
+
- job: coverage:windows
|
|
843
|
+
artifacts: false
|
|
844
|
+
optional: true
|
|
845
|
+
- job: py3.8
|
|
846
|
+
artifacts: false
|
|
847
|
+
optional: true
|
|
848
|
+
- job: py3.12
|
|
849
|
+
artifacts: false
|
|
850
|
+
optional: true
|
|
851
|
+
variables:
|
|
852
|
+
CI_LOCAL_NETWORK: 'host'
|
|
853
|
+
MKDOCS_EXPORTER_PDF_ENABLED: 'true'
|
|
854
|
+
script:
|
|
855
|
+
# Fetch all tags
|
|
856
|
+
- |
|
|
857
|
+
if [ -z "${CI_LOCAL:-}" ]; then
|
|
858
|
+
git fetch --tags --unshallow || true
|
|
859
|
+
fi
|
|
860
|
+
# Prepare documentation
|
|
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
|
|
869
|
+
# Generate documentation
|
|
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
|
|
877
|
+
after_script:
|
|
878
|
+
# Cleanup documentation
|
|
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
|
|
884
|
+
artifacts:
|
|
885
|
+
expire_in: 1 hour
|
|
886
|
+
paths:
|
|
887
|
+
- public
|
|
888
|
+
rules:
|
|
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]
|