spl-core 7.14.0rc2.dev1__tar.gz → 7.14.0rc4.dev2__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.
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/PKG-INFO +13 -12
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/pyproject.toml +17 -17
- spl_core-7.14.0rc4.dev2/src/spl_core/__init__.py +1 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/test_utils/artifacts_archiver.py +129 -13
- spl_core-7.14.0rc2.dev1/src/spl_core/__init__.py +0 -1
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/LICENSE +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/README.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/__run.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/common/__init__.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/common/path.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/common.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/conan.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/config/KConfig +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/gcov_maid/__init__.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/gcov_maid/gcov_maid.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kconfig/__init__.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kconfig/kconfig.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kconfig.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/__init__.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/create.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/.vscode/cmake-variants.json +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/KConfig +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/greeter/CMakeLists.txt +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/greeter/doc/_images/screenshot.png +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/greeter/doc/index.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/greeter/src/greeter.c +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/greeter/src/greeter.h +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/greeter/test/test_greeter.cc +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/main/CMakeLists.txt +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/main/doc/index.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/src/main/src/main.c +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/test/EnglishVariant/test__EnglishVariant.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/test/German/test__GermanVariant.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/variants/EnglishVariant/config.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/variants/EnglishVariant/parts.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/variants/GermanVariant/config.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/variants/GermanVariant/config.txt +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/application/variants/GermanVariant/parts.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/.gitignore +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/.vscode/cmake-kits.json +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/.vscode/extensions.json +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/.vscode/launch.json +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/.vscode/settings.json +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/.vscode/tasks.json +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/CMakeLists.txt +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/README.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/bootstrap.json +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/build.bat +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/build.ps1 +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/conf.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/doc/Doxyfile.in +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/doc/common/index.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/doc/components/index.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/doc/doxygen-awesome/LICENSE +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/doc/doxygen-awesome/doxygen-awesome.css +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/doc/software_architecture/index.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/doc/software_requirements/index.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/doc/test_report_template.txt +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/index.md +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/pypeline.yaml +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/pyproject.toml +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/pytest.ini +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/scoopfile.json +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/tools/toolchains/clang/toolchain.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/tools/toolchains/gcc/toolchain.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/main.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/spl.cmake +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/steps/collect_pr_changes.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/test_utils/archive_artifacts_collection.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/test_utils/base_variant_test_runner.py +0 -0
- {spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/test_utils/spl_build.py +0 -0
|
@@ -1,44 +1,45 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spl-core
|
|
3
|
-
Version: 7.14.
|
|
3
|
+
Version: 7.14.0rc4.dev2
|
|
4
4
|
Summary: Software Product Line Support for CMake
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Author: Avengineers
|
|
8
8
|
Author-email: karsten.guenther@kamg.de
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.10,<3.12
|
|
10
10
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Natural Language :: English
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
18
|
Classifier: Topic :: Software Development :: Libraries
|
|
18
|
-
Requires-Dist: cookiecutter (
|
|
19
|
+
Requires-Dist: cookiecutter (==2.6.0)
|
|
19
20
|
Requires-Dist: doxysphinx (>=3.3,<4.0)
|
|
20
21
|
Requires-Dist: gcovr (>=8.3,<9.0)
|
|
21
22
|
Requires-Dist: hammocking (>=0.8,<0.10)
|
|
22
23
|
Requires-Dist: kconfiglib (>=14.1,<15.0)
|
|
23
|
-
Requires-Dist: mlx-traceability (>=10,<
|
|
24
|
+
Requires-Dist: mlx-traceability (>=10,<12)
|
|
24
25
|
Requires-Dist: myst-parser (>=0.16)
|
|
25
26
|
Requires-Dist: py-app-dev (>=2.1,<3.0)
|
|
26
27
|
Requires-Dist: py7zr (>=1.0.0,<2.0.0)
|
|
27
28
|
Requires-Dist: pypeline-runner (>=1,<=2)
|
|
28
29
|
Requires-Dist: pypeline-semantic-release (>=0.4.1,<=0.5.0)
|
|
29
|
-
Requires-Dist: sphinx (>=
|
|
30
|
+
Requires-Dist: sphinx (>=7.3,<8.0)
|
|
30
31
|
Requires-Dist: sphinx-book-theme (>=1.1,<2.0)
|
|
31
32
|
Requires-Dist: sphinx-copybutton (>=0.5,<0.6)
|
|
32
|
-
Requires-Dist: sphinx-design (>=0.5,<0.
|
|
33
|
-
Requires-Dist: sphinx-needs (>=2,<
|
|
34
|
-
Requires-Dist: sphinx-new-tab-link (>=0.4,<0.
|
|
33
|
+
Requires-Dist: sphinx-design (>=0.5,<0.7)
|
|
34
|
+
Requires-Dist: sphinx-needs (>=2.0,<3.0)
|
|
35
|
+
Requires-Dist: sphinx-new-tab-link (>=0.4,<0.9)
|
|
35
36
|
Requires-Dist: sphinx-rtd-size (>=0.2,<0.3)
|
|
36
|
-
Requires-Dist: sphinx-rtd-theme (>=2,<
|
|
37
|
+
Requires-Dist: sphinx-rtd-theme (>=2.0,<3.0)
|
|
37
38
|
Requires-Dist: sphinx-test-reports (>=1.0,<2.0)
|
|
38
39
|
Requires-Dist: sphinxcontrib-datatemplates (>=0.11,<0.12)
|
|
39
|
-
Requires-Dist: sphinxcontrib-mermaid (>=
|
|
40
|
-
Requires-Dist: sphinxcontrib-plantuml (>=0.29,<0.
|
|
41
|
-
Requires-Dist: typer (>=0
|
|
40
|
+
Requires-Dist: sphinxcontrib-mermaid (>=0.9,<0.10)
|
|
41
|
+
Requires-Dist: sphinxcontrib-plantuml (>=0.29,<0.31)
|
|
42
|
+
Requires-Dist: typer (>=0,<1)
|
|
42
43
|
Project-URL: Bug Tracker, https://github.com/avengineers/spl-core/issues
|
|
43
44
|
Project-URL: Changelog, https://github.com/avengineers/spl-core/blob/develop/CHANGELOG.md
|
|
44
45
|
Project-URL: Documentation, https://spl-core.readthedocs.io
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "spl-core"
|
|
3
|
-
version = "7.14.0-
|
|
3
|
+
version = "7.14.0-rc4.dev.2"
|
|
4
4
|
description = "Software Product Line Support for CMake"
|
|
5
5
|
authors = ["Avengineers <karsten.guenther@kamg.de>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -24,37 +24,37 @@ please = "spl_core.main:main"
|
|
|
24
24
|
"Changelog" = "https://github.com/avengineers/spl-core/blob/develop/CHANGELOG.md"
|
|
25
25
|
|
|
26
26
|
[tool.poetry.dependencies]
|
|
27
|
-
python = ">=3.
|
|
27
|
+
python = ">=3.10,<3.12"
|
|
28
28
|
py-app-dev = "^2.1"
|
|
29
|
-
cookiecutter = "
|
|
29
|
+
cookiecutter = "==2.6.0"
|
|
30
30
|
gcovr = "^8.3"
|
|
31
31
|
hammocking = ">=0.8,<0.10"
|
|
32
32
|
kconfiglib = "^14.1"
|
|
33
|
-
typer = "^0
|
|
33
|
+
typer = "^0"
|
|
34
34
|
doxysphinx = "^3.3"
|
|
35
|
-
sphinx = "^
|
|
36
|
-
sphinx-rtd-theme = "
|
|
37
|
-
sphinxcontrib-mermaid = "^
|
|
38
|
-
sphinx-needs = "
|
|
35
|
+
sphinx = "^7.3"
|
|
36
|
+
sphinx-rtd-theme = "^2.0"
|
|
37
|
+
sphinxcontrib-mermaid = "^0.9"
|
|
38
|
+
sphinx-needs = "^2.0"
|
|
39
39
|
sphinx-test-reports = "^1.0"
|
|
40
40
|
sphinx-rtd-size = "^0.2"
|
|
41
41
|
sphinxcontrib-datatemplates = "^0.11"
|
|
42
|
-
sphinxcontrib-plantuml = ">=0.29,<0.
|
|
42
|
+
sphinxcontrib-plantuml = ">=0.29,<0.31"
|
|
43
43
|
sphinx-copybutton = "^0.5"
|
|
44
|
-
sphinx-new-tab-link = ">=0.4,<0.
|
|
44
|
+
sphinx-new-tab-link = ">=0.4,<0.9"
|
|
45
45
|
myst-parser = ">=0.16"
|
|
46
|
-
mlx-traceability = ">=10,<
|
|
46
|
+
mlx-traceability = ">=10,<12"
|
|
47
47
|
sphinx-book-theme = "^1.1"
|
|
48
|
-
sphinx-design = ">=0.5,<0.
|
|
48
|
+
sphinx-design = ">=0.5,<0.7"
|
|
49
49
|
pypeline-semantic-release = ">=0.4.1,<=0.5.0"
|
|
50
50
|
pypeline-runner = ">=1,<=2"
|
|
51
51
|
py7zr = "^1.0.0"
|
|
52
52
|
|
|
53
53
|
[tool.poetry.group.dev.dependencies]
|
|
54
|
-
pytest = ">=7,<
|
|
55
|
-
pytest-cov = "
|
|
56
|
-
pre-commit = "^
|
|
57
|
-
ruff = ">=0.5,<0.
|
|
54
|
+
pytest = ">=7,<9"
|
|
55
|
+
pytest-cov = "^4.0"
|
|
56
|
+
pre-commit = "^3.1.1"
|
|
57
|
+
ruff = ">=0.5,<0.13"
|
|
58
58
|
jinja2 = "*"
|
|
59
59
|
testfixtures = "*"
|
|
60
60
|
junitparser = "*"
|
|
@@ -62,7 +62,7 @@ mashumaro = "*"
|
|
|
62
62
|
loguru = "*"
|
|
63
63
|
flake8 = "*"
|
|
64
64
|
pipenv = "*"
|
|
65
|
-
python-semantic-release = "^9.
|
|
65
|
+
python-semantic-release = "^9.16.1"
|
|
66
66
|
|
|
67
67
|
[tool.semantic_release]
|
|
68
68
|
version_toml = ["pyproject.toml:tool.poetry.version"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "7.14.0-rc4.dev.2"
|
{spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/test_utils/artifacts_archiver.py
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import os
|
|
3
3
|
from dataclasses import dataclass
|
|
4
|
+
from datetime import datetime, timezone
|
|
4
5
|
from pathlib import Path
|
|
5
6
|
from typing import Dict, List, Optional
|
|
6
7
|
|
|
@@ -122,6 +123,7 @@ class ArtifactsArchiver:
|
|
|
122
123
|
def __init__(self) -> None:
|
|
123
124
|
self.archives: Dict[str, ArtifactsArchive] = {}
|
|
124
125
|
self._target_repos: Dict[str, str] = {}
|
|
126
|
+
# self._artifacts_metadata: Dict[str, Dict[str, Dict[str, str]]] = {} # variant -> category -> artifacts
|
|
125
127
|
|
|
126
128
|
def add_archive(self, out_dir: Path, archive_filename: str, target_repo: Optional[str] = None, archive_name: str = "default") -> ArtifactsArchive:
|
|
127
129
|
"""
|
|
@@ -214,28 +216,24 @@ class ArtifactsArchiver:
|
|
|
214
216
|
else:
|
|
215
217
|
return 28 # 4 weeks for PRs, feature branches, and other branches
|
|
216
218
|
|
|
217
|
-
|
|
219
|
+
@staticmethod
|
|
220
|
+
def _get_build_metadata() -> tuple[str, str, bool]:
|
|
218
221
|
"""
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
This function replicates the logic from the Jenkinsfile for determining the RT_TARGET
|
|
222
|
-
and creating the upload specification file. It uses Jenkins environment variables
|
|
223
|
-
when available, otherwise falls back to default values.
|
|
222
|
+
Get build metadata from environment variables or defaults.
|
|
224
223
|
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
Detects Jenkins environment variables when available, otherwise falls back
|
|
225
|
+
to local development defaults.
|
|
227
226
|
|
|
228
227
|
Returns:
|
|
229
|
-
|
|
228
|
+
Tuple of (branch_name, build_number, is_tag):
|
|
229
|
+
- branch_name: The branch or PR identifier
|
|
230
|
+
- build_number: The build number or "local_build"
|
|
231
|
+
- is_tag: Whether this is a tag build
|
|
230
232
|
"""
|
|
231
|
-
# Set local defaults first
|
|
232
|
-
change_id = None
|
|
233
233
|
branch_name = "local_branch"
|
|
234
234
|
build_number = "local_build"
|
|
235
235
|
is_tag = False
|
|
236
236
|
|
|
237
|
-
# Adapt values when Jenkins environment is detected
|
|
238
|
-
# TODO: check if an existing library can be used for CI context detection
|
|
239
237
|
if os.environ.get("JENKINS_URL"):
|
|
240
238
|
change_id = os.environ.get("CHANGE_ID")
|
|
241
239
|
jenkins_branch_name = os.environ.get("BRANCH_NAME")
|
|
@@ -256,6 +254,25 @@ class ArtifactsArchiver:
|
|
|
256
254
|
if jenkins_build_number:
|
|
257
255
|
build_number = jenkins_build_number
|
|
258
256
|
|
|
257
|
+
return branch_name, build_number, is_tag
|
|
258
|
+
|
|
259
|
+
def create_rt_upload_json(self, out_dir: Path) -> Path:
|
|
260
|
+
"""
|
|
261
|
+
Create a single rt-upload.json file containing all archives.
|
|
262
|
+
|
|
263
|
+
This function replicates the logic from the Jenkinsfile for determining the RT_TARGET
|
|
264
|
+
and creating the upload specification file. It uses Jenkins environment variables
|
|
265
|
+
when available, otherwise falls back to default values.
|
|
266
|
+
|
|
267
|
+
Args:
|
|
268
|
+
output_dir: Directory where the rt-upload.json file will be created
|
|
269
|
+
|
|
270
|
+
Returns:
|
|
271
|
+
Path to the created rt-upload.json file
|
|
272
|
+
"""
|
|
273
|
+
# Get build metadata from environment or defaults
|
|
274
|
+
branch_name, build_number, is_tag = self._get_build_metadata()
|
|
275
|
+
|
|
259
276
|
# Calculate retention period based on branch/tag
|
|
260
277
|
retention_period = self.calculate_retention_period(branch_name, is_tag)
|
|
261
278
|
|
|
@@ -291,6 +308,94 @@ class ArtifactsArchiver:
|
|
|
291
308
|
|
|
292
309
|
return json_path
|
|
293
310
|
|
|
311
|
+
def create_artifacts_json(self, variant: str, out_dir: Path) -> Path:
|
|
312
|
+
"""
|
|
313
|
+
Create an initial artifacts.json file with build metadata structure.
|
|
314
|
+
|
|
315
|
+
This function creates a fresh artifacts.json file with build metadata
|
|
316
|
+
but no artifacts. Use update_artifacts_json() to add artifact categories.
|
|
317
|
+
It uses Jenkins environment variables when available, otherwise falls back to default values.
|
|
318
|
+
|
|
319
|
+
Args:
|
|
320
|
+
variant: The variant name (e.g., "Disco")
|
|
321
|
+
out_dir: Directory where the artifacts.json file will be created
|
|
322
|
+
|
|
323
|
+
Returns:
|
|
324
|
+
Path to the created artifacts.json file
|
|
325
|
+
|
|
326
|
+
Raises:
|
|
327
|
+
ValueError: If variant is empty or None
|
|
328
|
+
"""
|
|
329
|
+
# Input validation
|
|
330
|
+
if not variant or not variant.strip():
|
|
331
|
+
raise ValueError("Variant name cannot be empty or None")
|
|
332
|
+
|
|
333
|
+
# Get build metadata from environment or defaults
|
|
334
|
+
branch_name, build_number, _ = self._get_build_metadata()
|
|
335
|
+
|
|
336
|
+
# Create the initial artifacts.json structure
|
|
337
|
+
artifacts_data = {"variant": variant, "build_timestamp": datetime.now(timezone.utc).isoformat(timespec="seconds") + "Z", "build_number": build_number, "branch_name": branch_name, "artifacts": {}}
|
|
338
|
+
|
|
339
|
+
# Create the artifacts.json file
|
|
340
|
+
json_path = out_dir / "artifacts.json"
|
|
341
|
+
json_path.parent.mkdir(parents=True, exist_ok=True)
|
|
342
|
+
|
|
343
|
+
with open(json_path, "w") as f:
|
|
344
|
+
json.dump(artifacts_data, f, indent=2)
|
|
345
|
+
|
|
346
|
+
return json_path
|
|
347
|
+
|
|
348
|
+
def update_artifacts_json(self, category: str, artifacts: Dict[str, str], artifacts_json_path: Path) -> Path:
|
|
349
|
+
"""
|
|
350
|
+
Add or update artifacts in a specific category for the artifacts.json file.
|
|
351
|
+
|
|
352
|
+
Args:
|
|
353
|
+
category: The artifact category (e.g., "test_reports", "sca_reports", "build_binaries")
|
|
354
|
+
artifacts: Dictionary mapping artifact names to their URLs/paths
|
|
355
|
+
artifacts_json_path: Path to the artifacts.json file to be updated
|
|
356
|
+
|
|
357
|
+
Returns:
|
|
358
|
+
Path to the updated artifacts.json file
|
|
359
|
+
|
|
360
|
+
Raises:
|
|
361
|
+
ValueError: If category is empty, artifacts dictionary is empty, or JSON structure is invalid
|
|
362
|
+
FileNotFoundError: If artifacts.json file does not exist
|
|
363
|
+
"""
|
|
364
|
+
# Input validation
|
|
365
|
+
if not category or not category.strip():
|
|
366
|
+
raise ValueError("Category name cannot be empty or None")
|
|
367
|
+
if not artifacts:
|
|
368
|
+
raise ValueError("Artifacts dictionary cannot be empty")
|
|
369
|
+
|
|
370
|
+
# Check if artifacts.json file exists
|
|
371
|
+
if not artifacts_json_path.exists():
|
|
372
|
+
raise FileNotFoundError(f"artifacts.json file does not exist at {artifacts_json_path}. Please create it first using create_artifacts_json().")
|
|
373
|
+
|
|
374
|
+
# Read existing artifacts.json file
|
|
375
|
+
try:
|
|
376
|
+
with open(artifacts_json_path) as f:
|
|
377
|
+
artifacts_data = json.load(f)
|
|
378
|
+
except json.JSONDecodeError as e:
|
|
379
|
+
raise ValueError(f"Could not parse artifacts.json: {e}") from e
|
|
380
|
+
except OSError as e:
|
|
381
|
+
raise ValueError(f"Could not read artifacts.json: {e}") from e
|
|
382
|
+
|
|
383
|
+
# Validate that the file has the expected structure
|
|
384
|
+
if not artifacts_data or "artifacts" not in artifacts_data:
|
|
385
|
+
raise ValueError("artifacts.json file has invalid structure. Expected 'artifacts' section not found.")
|
|
386
|
+
|
|
387
|
+
# Update the specific category with new artifacts
|
|
388
|
+
if category in artifacts_data["artifacts"]:
|
|
389
|
+
artifacts_data["artifacts"][category].update(artifacts)
|
|
390
|
+
else:
|
|
391
|
+
artifacts_data["artifacts"][category] = artifacts.copy()
|
|
392
|
+
|
|
393
|
+
# Write the updated data back to the file
|
|
394
|
+
with open(artifacts_json_path, "w") as f:
|
|
395
|
+
json.dump(artifacts_data, f, indent=2)
|
|
396
|
+
|
|
397
|
+
return artifacts_json_path
|
|
398
|
+
|
|
294
399
|
def list_archives(self) -> List[str]:
|
|
295
400
|
"""
|
|
296
401
|
Get a list of all archive names.
|
|
@@ -347,3 +452,14 @@ class ArtifactsArchiver:
|
|
|
347
452
|
#
|
|
348
453
|
# created_files = archiver.create_all_archives()
|
|
349
454
|
# upload_json = archiver.create_rt_upload_json(Path("./build/output")) # only includes archives with target repos
|
|
455
|
+
#
|
|
456
|
+
# ## Artifacts.json use case (variant-specific metadata):
|
|
457
|
+
# archiver = ArtifactsArchiver()
|
|
458
|
+
# variant = "Disco"
|
|
459
|
+
# out_dir = Path("./build/output")
|
|
460
|
+
#
|
|
461
|
+
# # Create initial artifacts.json file first, then add categories
|
|
462
|
+
# artifacts_json_path = archiver.create_artifacts_json(variant, out_dir)
|
|
463
|
+
# archiver.update_artifacts_json("test_reports", test_reports, artifacts_json_path)
|
|
464
|
+
# archiver.update_artifacts_json("sca_reports", sca_reports, artifacts_json_path)
|
|
465
|
+
# archiver.update_artifacts_json("build_binaries", build_binaries, artifacts_json_path)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "7.14.0-rc2.dev.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/kickstart/templates/project/conf.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spl_core-7.14.0rc2.dev1 → spl_core-7.14.0rc4.dev2}/src/spl_core/steps/collect_pr_changes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|