ScriptCollection 4.2.78__py3-none-any.whl → 4.2.79__py3-none-any.whl
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.
- ScriptCollection/Executables.py +9 -1
- ScriptCollection/GeneralUtilities.py +1 -0
- ScriptCollection/OCIImages/AbstractImageHandler.py +7 -3
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebian.py +7 -2
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebianSlim.py +7 -2
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGeneric.py +7 -2
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGenericV.py +7 -2
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabCE.py +21 -0
- ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabEE.py +21 -0
- ScriptCollection/OCIImages/OCIImageManager.py +81 -11
- ScriptCollection/ScriptCollectionCore.py +7 -1
- ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py +1 -2
- ScriptCollection/TFCPS/TFCPS_Tools_General.py +1 -1
- ScriptCollection/__pycache__/GeneralUtilities.cpython-311.pyc +0 -0
- ScriptCollection/__pycache__/__init__.cpython-311.pyc +0 -0
- {scriptcollection-4.2.78.dist-info → scriptcollection-4.2.79.dist-info}/METADATA +3 -3
- {scriptcollection-4.2.78.dist-info → scriptcollection-4.2.79.dist-info}/RECORD +20 -16
- {scriptcollection-4.2.78.dist-info → scriptcollection-4.2.79.dist-info}/WHEEL +0 -0
- {scriptcollection-4.2.78.dist-info → scriptcollection-4.2.79.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.2.78.dist-info → scriptcollection-4.2.79.dist-info}/top_level.txt +0 -0
ScriptCollection/Executables.py
CHANGED
|
@@ -10,6 +10,7 @@ from .GeneralUtilities import GeneralUtilities
|
|
|
10
10
|
from .SCLog import LogLevel, SCLog
|
|
11
11
|
from .TFCPS.TFCPS_CodeUnit_BuildCodeUnits import TFCPS_CodeUnit_BuildCodeUnits
|
|
12
12
|
from .TFCPS.TFCPS_Tools_General import TFCPS_Tools_General
|
|
13
|
+
from .OCIImages.OCIImageManager import OCIImageManager
|
|
13
14
|
|
|
14
15
|
def FilenameObfuscator() -> int:
|
|
15
16
|
parser = argparse.ArgumentParser(description=''''Obfuscates the names of all files in the given folder.
|
|
@@ -745,7 +746,14 @@ def OCRAnalysisOfRepository() -> int:
|
|
|
745
746
|
|
|
746
747
|
|
|
747
748
|
def UpdateImagesInDockerComposeFile() -> int:
|
|
748
|
-
|
|
749
|
+
parser = argparse.ArgumentParser(description="This function updates images in a Docker Compose file.")
|
|
750
|
+
parser.add_argument('-f', '--file', required=False,default="./docker-compose.yml")
|
|
751
|
+
#TODO add possibility to set version-echolon for each image specifically and pass this information to OCIImageManager
|
|
752
|
+
args = parser.parse_args()
|
|
753
|
+
sc = ScriptCollectionCore()
|
|
754
|
+
file=GeneralUtilities.resolve_relative_path(args.file, os.getcwd())
|
|
755
|
+
oci=OCIImageManager(sc)
|
|
756
|
+
oci.update_image_in_docker_compose_file(file)
|
|
749
757
|
return 0
|
|
750
758
|
|
|
751
759
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from packaging.version import Version
|
|
3
|
-
from ..GeneralUtilities import GeneralUtilities
|
|
3
|
+
from ..GeneralUtilities import GeneralUtilities, VersionEcholon
|
|
4
4
|
|
|
5
5
|
class AbstractImageHandler(ABC):
|
|
6
6
|
|
|
@@ -26,9 +26,13 @@ class AbstractImageHandler(ABC):
|
|
|
26
26
|
raise NotImplementedError()#because it is abstract
|
|
27
27
|
|
|
28
28
|
@abstractmethod
|
|
29
|
-
def tag_to_version(self,image_name:str,
|
|
29
|
+
def tag_to_version(self,image_name:str,tag:str)->Version:
|
|
30
30
|
raise NotImplementedError()#because it is abstract
|
|
31
31
|
|
|
32
32
|
@abstractmethod
|
|
33
|
-
def version_to_tag(self,image_name:str,
|
|
33
|
+
def version_to_tag(self,image_name:str,version:Version)->str:
|
|
34
|
+
raise NotImplementedError()#because it is abstract
|
|
35
|
+
|
|
36
|
+
@abstractmethod
|
|
37
|
+
def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
|
|
34
38
|
raise NotImplementedError()#because it is abstract
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
from packaging.version import Version
|
|
2
|
+
|
|
3
|
+
from ScriptCollection.build.lib.ScriptCollection.GeneralUtilities import VersionEcholon
|
|
2
4
|
from ..AbstractImageHandler import AbstractImageHandler
|
|
3
5
|
|
|
4
6
|
class ImageHandlerDebian(AbstractImageHandler):
|
|
@@ -9,8 +11,11 @@ class ImageHandlerDebian(AbstractImageHandler):
|
|
|
9
11
|
def get_available_tags_of_image(self,image_name:str,registry_address:str)->list[str]:
|
|
10
12
|
raise NotImplementedError()
|
|
11
13
|
|
|
12
|
-
def tag_to_version(self,image_name:str,
|
|
14
|
+
def tag_to_version(self,image_name:str,tag:str)->Version:
|
|
13
15
|
raise NotImplementedError()
|
|
14
16
|
|
|
15
|
-
def version_to_tag(self,image_name:str,
|
|
17
|
+
def version_to_tag(self,image_name:str,version:Version)->str:
|
|
16
18
|
raise NotImplementedError()
|
|
19
|
+
|
|
20
|
+
def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
|
|
21
|
+
return VersionEcholon.LatestPatch
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
from packaging.version import Version
|
|
2
|
+
|
|
3
|
+
from ScriptCollection.ScriptCollection.GeneralUtilities import VersionEcholon
|
|
2
4
|
from ..AbstractImageHandler import AbstractImageHandler
|
|
3
5
|
|
|
4
6
|
class ImageHandlerDebianSlim(AbstractImageHandler):
|
|
@@ -9,8 +11,11 @@ class ImageHandlerDebianSlim(AbstractImageHandler):
|
|
|
9
11
|
def get_available_tags_of_image(self,image_name:str,registry_address:str)->list[str]:
|
|
10
12
|
raise NotImplementedError()
|
|
11
13
|
|
|
12
|
-
def tag_to_version(self,image_name:str,
|
|
14
|
+
def tag_to_version(self,image_name:str,tag:str)->Version:
|
|
13
15
|
raise NotImplementedError()
|
|
14
16
|
|
|
15
|
-
def version_to_tag(self,image_name:str,
|
|
17
|
+
def version_to_tag(self,image_name:str,version:Version)->str:
|
|
16
18
|
raise NotImplementedError()
|
|
19
|
+
|
|
20
|
+
def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
|
|
21
|
+
return VersionEcholon.LatestPatch
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
from packaging.version import Version
|
|
2
|
+
|
|
3
|
+
from ScriptCollection.build.lib.ScriptCollection.GeneralUtilities import VersionEcholon
|
|
2
4
|
from ..AbstractImageHandler import AbstractImageHandler
|
|
3
5
|
|
|
4
6
|
class ImageHandlerGeneric(AbstractImageHandler):
|
|
@@ -9,8 +11,11 @@ class ImageHandlerGeneric(AbstractImageHandler):
|
|
|
9
11
|
def get_available_tags_of_image(self,image_name:str,registry_address:str)->list[str]:
|
|
10
12
|
raise NotImplementedError()
|
|
11
13
|
|
|
12
|
-
def tag_to_version(self,image_name:str,
|
|
14
|
+
def tag_to_version(self,image_name:str,tag:str)->Version:
|
|
15
|
+
raise NotImplementedError()
|
|
16
|
+
|
|
17
|
+
def version_to_tag(self,image_name:str,version:Version)->str:
|
|
13
18
|
raise NotImplementedError()
|
|
14
19
|
|
|
15
|
-
def
|
|
20
|
+
def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
|
|
16
21
|
raise NotImplementedError()
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
from packaging.version import Version
|
|
2
|
+
|
|
3
|
+
from ScriptCollection.ScriptCollection.GeneralUtilities import VersionEcholon
|
|
2
4
|
from ..AbstractImageHandler import AbstractImageHandler
|
|
3
5
|
|
|
4
6
|
class ImageHandlerGenericV(AbstractImageHandler):
|
|
@@ -9,8 +11,11 @@ class ImageHandlerGenericV(AbstractImageHandler):
|
|
|
9
11
|
def get_available_tags_of_image(self,image_name:str,registry_address:str)->list[str]:
|
|
10
12
|
raise NotImplementedError()
|
|
11
13
|
|
|
12
|
-
def tag_to_version(self,image_name:str,
|
|
14
|
+
def tag_to_version(self,image_name:str,tag:str)->Version:
|
|
15
|
+
raise NotImplementedError()
|
|
16
|
+
|
|
17
|
+
def version_to_tag(self,image_name:str,version:Version)->str:
|
|
13
18
|
raise NotImplementedError()
|
|
14
19
|
|
|
15
|
-
def
|
|
20
|
+
def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
|
|
16
21
|
raise NotImplementedError()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from packaging.version import Version
|
|
2
|
+
|
|
3
|
+
from ScriptCollection.build.lib.ScriptCollection.GeneralUtilities import VersionEcholon
|
|
4
|
+
from ..AbstractImageHandler import AbstractImageHandler
|
|
5
|
+
|
|
6
|
+
class ImageHandlerGitlabCE(AbstractImageHandler):
|
|
7
|
+
|
|
8
|
+
def can_handle(self,image_name:str)->bool:
|
|
9
|
+
raise NotImplementedError()#TODO
|
|
10
|
+
|
|
11
|
+
def get_available_tags_of_image(self,image_name:str,registry_address:str)->list[str]:
|
|
12
|
+
raise NotImplementedError()
|
|
13
|
+
|
|
14
|
+
def tag_to_version(self,image_name:str,tag:str)->Version:
|
|
15
|
+
raise NotImplementedError()
|
|
16
|
+
|
|
17
|
+
def version_to_tag(self,image_name:str,version:Version)->str:
|
|
18
|
+
raise NotImplementedError()
|
|
19
|
+
|
|
20
|
+
def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
|
|
21
|
+
return VersionEcholon.CustomAlgorithm
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from packaging.version import Version
|
|
2
|
+
|
|
3
|
+
from ScriptCollection.ScriptCollection.GeneralUtilities import VersionEcholon
|
|
4
|
+
from ..AbstractImageHandler import AbstractImageHandler
|
|
5
|
+
|
|
6
|
+
class ImageHandlerGitlabEE(AbstractImageHandler):
|
|
7
|
+
|
|
8
|
+
def can_handle(self,image_name:str)->bool:
|
|
9
|
+
raise NotImplementedError()#TODO
|
|
10
|
+
|
|
11
|
+
def get_available_tags_of_image(self,image_name:str,registry_address:str)->list[str]:
|
|
12
|
+
raise NotImplementedError()
|
|
13
|
+
|
|
14
|
+
def tag_to_version(self,image_name:str,tag:str)->Version:
|
|
15
|
+
raise NotImplementedError()
|
|
16
|
+
|
|
17
|
+
def version_to_tag(self,image_name:str,version:Version)->str:
|
|
18
|
+
raise NotImplementedError()
|
|
19
|
+
|
|
20
|
+
def get_default_echolon_for_update(self,image_name:str)->VersionEcholon:
|
|
21
|
+
return VersionEcholon.CustomAlgorithm
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import os
|
|
2
|
+
from unittest import result
|
|
2
3
|
from packaging.version import Version
|
|
3
4
|
from ..GeneralUtilities import GeneralUtilities
|
|
4
5
|
from ..ScriptCollectionCore import ScriptCollectionCore
|
|
5
6
|
from ..GeneralUtilities import VersionEcholon
|
|
7
|
+
from ..SCLog import LogLevel
|
|
6
8
|
from .AbstractImageHandler import AbstractImageHandler
|
|
9
|
+
from .ConcreteImageHandlers.ImageHandlerDebian import ImageHandlerDebian
|
|
7
10
|
from .ConcreteImageHandlers.ImageHandlerDebianSlim import ImageHandlerDebianSlim
|
|
11
|
+
from .ConcreteImageHandlers.ImageHandlerGeneric import ImageHandlerGeneric
|
|
12
|
+
from .ConcreteImageHandlers.ImageHandlerGenericV import ImageHandlerGenericV
|
|
13
|
+
from .ConcreteImageHandlers.ImageHandlerGitlabCE import ImageHandlerGitlabCE
|
|
14
|
+
from .ConcreteImageHandlers.ImageHandlerGitlabEE import ImageHandlerGitlabEE
|
|
8
15
|
|
|
9
16
|
class OCIImageManager:
|
|
10
17
|
|
|
@@ -15,8 +22,14 @@ class OCIImageManager:
|
|
|
15
22
|
if sc is None:
|
|
16
23
|
sc=ScriptCollectionCore()
|
|
17
24
|
self.__sc=sc
|
|
18
|
-
self.image_handler=[
|
|
19
|
-
|
|
25
|
+
self.image_handler=[
|
|
26
|
+
ImageHandlerDebian(),
|
|
27
|
+
ImageHandlerDebianSlim(),
|
|
28
|
+
ImageHandlerGeneric(),
|
|
29
|
+
ImageHandlerGenericV(),
|
|
30
|
+
ImageHandlerGitlabCE(),
|
|
31
|
+
ImageHandlerGitlabEE(),
|
|
32
|
+
]
|
|
20
33
|
|
|
21
34
|
def get_image_handler(self,image_name:str)->AbstractImageHandler:
|
|
22
35
|
for image_handler in self.image_handler:
|
|
@@ -87,23 +100,80 @@ class OCIImageManager:
|
|
|
87
100
|
def get_registry_address_for_image_with_default_tag(self,repository:str,image_name:str,strict_mode:bool=True)->str:
|
|
88
101
|
return f"{self.get_registry_address_for_image(repository,image_name)}:{self.get_tag_for_image(repository,image_name,strict_mode)}"
|
|
89
102
|
|
|
90
|
-
def
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
103
|
+
def update_default_tag_for_images_in_image_definitions_file(self,repository:str,search_in_custom_registry_only_if_available:bool)->None:
|
|
104
|
+
file=f"{repository}/.ScriptCollection/OCIImages/ImageDefinition.csv"
|
|
105
|
+
GeneralUtilities.assert_file_exists(file)
|
|
106
|
+
lines=GeneralUtilities.read_nonempty_lines_from_file(file)
|
|
107
|
+
new_lines:list[str]=[]
|
|
108
|
+
#file looks like:
|
|
109
|
+
#ImageName;UpstreamRegistryAddress;DefaultTag
|
|
110
|
+
#Debian;docker.io/library/debian;13.4-slim
|
|
111
|
+
for line in lines:
|
|
112
|
+
if line.startswith("ImageName;"): #header line
|
|
113
|
+
new_lines.append(line)
|
|
114
|
+
continue
|
|
115
|
+
splitted_line=line.split(";")
|
|
116
|
+
image_name=splitted_line[0]
|
|
117
|
+
registry_address=splitted_line[1]
|
|
118
|
+
default_tag=splitted_line[2]
|
|
119
|
+
tag=default_tag
|
|
120
|
+
try:
|
|
121
|
+
addresses_to_check=[]
|
|
122
|
+
if self.custom_registry_is_defined(image_name):
|
|
123
|
+
addresses_to_check.append(self.get_registry_address_for_image(repository,image_name))
|
|
124
|
+
else:
|
|
125
|
+
if search_in_custom_registry_only_if_available:
|
|
126
|
+
raise ValueError(f"No custom registry defined for image {image_name}.")
|
|
127
|
+
if not search_in_custom_registry_only_if_available:
|
|
128
|
+
addresses_to_check.append(registry_address)
|
|
129
|
+
newest_versions:set[Version]=[default_tag]
|
|
130
|
+
current_version=Version(default_tag)
|
|
131
|
+
for address in addresses_to_check:
|
|
132
|
+
newest_versions_for_address=self.get_available_versions_of_image_which_are_newer(image_name,address,current_version,VersionEcholon.LatestVersion)
|
|
133
|
+
if newest_versions_for_address is not None:
|
|
134
|
+
newest_versions.update(newest_versions_for_address)
|
|
135
|
+
GeneralUtilities.assert_condition(len(newest_versions)>0,f"Could not find any version for image {image_name} in registry {registry_address}.")
|
|
136
|
+
newest_version=max(newest_versions)
|
|
137
|
+
tag=self.version_to_tag(image_name,newest_version)
|
|
138
|
+
except Exception as e:
|
|
139
|
+
self.__sc.log.log(f"Could not get tag for image {image_name} from registry {registry_address}. Reason: {str(e)}",LogLevel.Warning)
|
|
140
|
+
new_lines.append(f"{image_name};{registry_address};{tag}")
|
|
141
|
+
GeneralUtilities.write_lines_to_file(file,new_lines)
|
|
95
142
|
|
|
143
|
+
def get_available_versions_of_image_which_are_newer(self,image_name:str,registry_address:str,current_version:Version,echolon: VersionEcholon)->Version:
|
|
144
|
+
image_handler=self.get_image_handler(image_name)
|
|
145
|
+
result= None #TODO calculate result using get_available_tags_of_image.
|
|
146
|
+
#TODO if echolon is not none, then use echolon instead of the default echolon of the image-handler.
|
|
147
|
+
#TODO return the versions sorted.
|
|
148
|
+
#TODO if result is empty: return None
|
|
149
|
+
return result
|
|
150
|
+
|
|
96
151
|
def get_available_tags_of_image(self,image_name:str,registry_address:str)->list[str]:
|
|
97
152
|
"""registry_address must have one of theese formats: "myregistry.example.com/debian" or "docker.io/debian" or "docker.io/myuser/debian".
|
|
98
153
|
returns something like ["13.2-slim", "13.2", "13.3-slim", "13.3"]."""
|
|
99
154
|
return self.get_image_handler(image_name).get_available_tags_of_image(image_name,registry_address)
|
|
100
155
|
|
|
101
|
-
def tag_to_version(self,image_name:str,
|
|
156
|
+
def tag_to_version(self,image_name:str,tag:str)->Version:
|
|
102
157
|
"""registry_address must have one of theese formats: "myregistry.example.com/debian" or "docker.io/debian" or "docker.io/myuser/debian"."""
|
|
103
|
-
return self.get_image_handler(image_name).tag_to_version(image_name,
|
|
158
|
+
return self.get_image_handler(image_name).tag_to_version(image_name, tag)
|
|
104
159
|
|
|
105
|
-
def version_to_tag(self,image_name:str,
|
|
160
|
+
def version_to_tag(self,image_name:str,version:Version)->str:
|
|
106
161
|
"""registry_address must have one of theese formats: "myregistry.example.com/debian" or "docker.io/debian" or "docker.io/myuser/debian".
|
|
107
162
|
returns something like "13.3-slim".
|
|
108
163
|
If there are multiple tags available for a certain version then the image-handler decides which one will be returned."""
|
|
109
|
-
return self.get_image_handler(image_name).version_to_tag(image_name,
|
|
164
|
+
return self.get_image_handler(image_name).version_to_tag(image_name,version)
|
|
165
|
+
|
|
166
|
+
def get_images_used_in_docker_compose_file(self,docker_compose_file:str)->dict[str,tuple[str,str,str]]:#returns dict[service_name,[image_name,image_address,current_tag]]
|
|
167
|
+
GeneralUtilities.assert_file_exists(docker_compose_file)
|
|
168
|
+
return {}#TODO implement function
|
|
169
|
+
|
|
170
|
+
def update_image_in_docker_compose_file(self,docker_compose_file:str)->None:
|
|
171
|
+
for service,service_information in self.get_images_used_in_docker_compose_file(docker_compose_file).items():
|
|
172
|
+
image_name=service_information[0]
|
|
173
|
+
image_address=service_information[1]
|
|
174
|
+
current_tag=service_information[2]
|
|
175
|
+
image_handler=self.get_image_handler(image_name)
|
|
176
|
+
new_versions_for_address=self.get_available_versions_of_image_which_are_newer(image_name,image_address,self.tag_to_version(image_name,current_tag),image_handler.get_default_echolon_for_update())
|
|
177
|
+
new_tag=self.version_to_tag(image_name,new_versions_for_address)
|
|
178
|
+
#TODO update tag for service in docker-compose-file to new_tag
|
|
179
|
+
|
|
@@ -38,7 +38,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
38
38
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
39
39
|
from .SCLog import SCLog, LogLevel
|
|
40
40
|
|
|
41
|
-
version = "4.2.
|
|
41
|
+
version = "4.2.79"
|
|
42
42
|
__version__ = version
|
|
43
43
|
|
|
44
44
|
class VSCodeWorkspaceShellTask:
|
|
@@ -1998,6 +1998,12 @@ class ScriptCollectionCore:
|
|
|
1998
1998
|
return self.program_runner.run_program(program, arguments, working_directory, custom_argument, interactive)
|
|
1999
1999
|
return self.run_program_argsasarray(program, GeneralUtilities.arguments_to_array(arguments), working_directory, print_errors_as_information, log_file, timeoutInSeconds, addLogOverhead, title, log_namespace, GeneralUtilities.arguments_to_array(arguments_for_log), throw_exception_if_exitcode_is_not_zero, custom_argument, interactive, print_live_output)
|
|
2000
2000
|
|
|
2001
|
+
# Return-values program_runner: Exitcode, StdOut, StdErr, Pid
|
|
2002
|
+
@GeneralUtilities.check_arguments
|
|
2003
|
+
def run_program_argsasarray_with_retry(self, program: str, arguments_as_array: list[str] = [], working_directory: str = None, print_errors_as_information: bool = False, log_file: str = None, timeoutInSeconds: int = 600, addLogOverhead: bool = False, title: str = None, log_namespace: str = "", arguments_for_log: list[str] = None, throw_exception_if_exitcode_is_not_zero: bool = True, custom_argument: object = None, interactive: bool = False, print_live_output: bool = False, amount_of_attempts: int = 5, delay_in_seconds: int = 2) -> tuple[int, str, str, int]:
|
|
2004
|
+
return GeneralUtilities.retry_action(lambda: self.run_program_argsasarray(program, arguments_as_array, working_directory, print_errors_as_information, log_file, timeoutInSeconds, addLogOverhead, title, log_namespace,arguments_for_log, throw_exception_if_exitcode_is_not_zero, custom_argument, interactive, print_live_output), amount_of_attempts, delay_in_seconds=delay_in_seconds)
|
|
2005
|
+
|
|
2006
|
+
|
|
2001
2007
|
# Return-values program_runner: Pid
|
|
2002
2008
|
@GeneralUtilities.check_arguments
|
|
2003
2009
|
def run_program_argsasarray_async(self, program: str, arguments_as_array: list[str] = [], working_directory: str = None, print_errors_as_information: bool = False, log_file: str = None, timeoutInSeconds: int = 600, addLogOverhead: bool = False, title: str = None, log_namespace: str = "", arguments_for_log: list[str] = None, custom_argument: object = None, interactive: bool = False) -> int:
|
|
@@ -13,7 +13,6 @@ class TFCPS_CodeUnitSpecific_Docker_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
13
13
|
def __init__(self,current_file:str,verbosity:LogLevel,targetenvironmenttype:str,use_cache:bool,is_pre_merge:bool):
|
|
14
14
|
super().__init__(current_file, verbosity,targetenvironmenttype,use_cache,is_pre_merge)
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
@GeneralUtilities.check_arguments
|
|
18
17
|
def build(self,platforms:list[Platform],custom_arguments:dict[str,str]) -> None:
|
|
19
18
|
codeunitname: str =self.get_codeunit_name()
|
|
@@ -44,7 +43,7 @@ class TFCPS_CodeUnitSpecific_Docker_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
44
43
|
args.append(f"type=docker,dest={target_file}")
|
|
45
44
|
args.append(".")
|
|
46
45
|
time.sleep(5)
|
|
47
|
-
self._protected_sc.
|
|
46
|
+
self._protected_sc.run_program_argsasarray_with_retry("docker", args, codeunit_folder, print_errors_as_information=True,print_live_output=self.get_verbosity()==LogLevel.Debug,amount_of_attempts=3,delay_in_seconds=5)
|
|
48
47
|
time.sleep(2)
|
|
49
48
|
self._protected_sc.run_program_argsasarray("docker", ["load", "-i", target_file], codeunit_folder, print_errors_as_information=True,print_live_output=self.get_verbosity()==LogLevel.Debug)
|
|
50
49
|
|
|
@@ -1562,4 +1562,4 @@ class TFCPS_Tools_General:
|
|
|
1562
1562
|
|
|
1563
1563
|
|
|
1564
1564
|
def update_dependent_oci_images(self,repo:str):
|
|
1565
|
-
|
|
1565
|
+
self.oci_image_manager.update_default_tag_for_images_in_image_definitions_file(repo,True)
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ScriptCollection
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.79
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Home-page: https://github.com/anionDev/ScriptCollection
|
|
6
6
|
Author: Marius Göcke
|
|
@@ -22,7 +22,7 @@ Classifier: Topic :: Terminals
|
|
|
22
22
|
Classifier: Topic :: Utilities
|
|
23
23
|
Requires-Python: >=3.10
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
|
-
Requires-Dist: build>=1.
|
|
25
|
+
Requires-Dist: build>=1.5.0
|
|
26
26
|
Requires-Dist: coverage>=7.13.5
|
|
27
27
|
Requires-Dist: cyclonedx-bom>=7.1.0
|
|
28
28
|
Requires-Dist: defusedxml>=0.7.1
|
|
@@ -32,7 +32,7 @@ Requires-Dist: lxml>=6.0.1
|
|
|
32
32
|
Requires-Dist: ntplib>=0.4.0
|
|
33
33
|
Requires-Dist: Pillow>=11.3.0
|
|
34
34
|
Requires-Dist: psutil>=7.2.2
|
|
35
|
-
Requires-Dist: pycdlib>=1.
|
|
35
|
+
Requires-Dist: pycdlib>=1.16.0
|
|
36
36
|
Requires-Dist: Pygments>=2.20.0
|
|
37
37
|
Requires-Dist: pylint>=4.0.5
|
|
38
38
|
Requires-Dist: pyOpenSSL>=25.3.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
ScriptCollection/AnionBuildPlatform.py,sha256=K-PHarX802A0PU8uRu0GNcEZiXujFoXHACe-X9YJsAQ,11711
|
|
2
2
|
ScriptCollection/CertificateUpdater.py,sha256=Pa6eyjQSx7IIvj4PQVMI0IwMs01KQrNSB7Qa-7lRfBs,9375
|
|
3
|
-
ScriptCollection/Executables.py,sha256=
|
|
4
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
|
3
|
+
ScriptCollection/Executables.py,sha256=RXEm_fbfO4VuPj-OS0YbRgbUHYL4Xr4PD599kaXINBA,44783
|
|
4
|
+
ScriptCollection/GeneralUtilities.py,sha256=JYcsEad4LA_kdlUVECk21wX8MtOv4AeIbD95_Hco2hk,65522
|
|
5
5
|
ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
|
|
6
6
|
ScriptCollection/ProcessesRunner.py,sha256=o5raxIt3lknNPoPrjNzJ2bprRPJ3SnL0rrR7crraD7E,1523
|
|
7
7
|
ScriptCollection/ProgramRunnerBase.py,sha256=4A2eQgSg_rRgQcgSi-LYtUlM-uSQEpS7qFWn0tWt4uo,2171
|
|
@@ -9,15 +9,17 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
|
|
|
9
9
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
|
10
10
|
ScriptCollection/ProgramRunnerSudo.py,sha256=_khC3xuTdrPoLluBJZWfldltmmuKltABJPcbjZSFW-4,4835
|
|
11
11
|
ScriptCollection/SCLog.py,sha256=8TRy1LeYMsPOIuWUcnUNNbO5pd-cNBS-3cn-kdzP8FU,4768
|
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=a3Y6jKYzMqc33-AaG-MP0erF0kDnYCdCY7fJkP1GX3M,188192
|
|
13
13
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=
|
|
15
|
-
ScriptCollection/OCIImages/OCIImageManager.py,sha256=
|
|
14
|
+
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=o129UYDtLymCRjMZBP9Puaj19ueMHoNt6UTLspfnaRc,1758
|
|
15
|
+
ScriptCollection/OCIImages/OCIImageManager.py,sha256=awAFVkPifuySPjZ0NGiXeZidAo0D4qoMaHSGFAruq0s,10655
|
|
16
16
|
ScriptCollection/OCIImages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebian.py,sha256=
|
|
18
|
-
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebianSlim.py,sha256=
|
|
19
|
-
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGeneric.py,sha256=
|
|
20
|
-
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGenericV.py,sha256=
|
|
17
|
+
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebian.py,sha256=vHWrw_uMflgEleCyh-1cvBQ5mjYZ4gkiVj7r8KcowhA,774
|
|
18
|
+
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerDebianSlim.py,sha256=opzuFLK3tsLcHVm4F5z1mSGl7JHcv7Lz-bvasXRh6eU,768
|
|
19
|
+
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGeneric.py,sha256=NgFasra24O-9h_Eoh-25g_nS9d14QNEiySKz6S_6Ul4,765
|
|
20
|
+
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGenericV.py,sha256=BdrBuvZVqAh1-FnDAk7c4XEvjpaRbkrSeNZNoRjGK1o,756
|
|
21
|
+
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabCE.py,sha256=9MKsoaygz39UEdum0CTTixUt3FM0CY4AQtjays5lWms,780
|
|
22
|
+
ScriptCollection/OCIImages/ConcreteImageHandlers/ImageHandlerGitlabEE.py,sha256=158aIO7O2CX_QtO4ONHwQnPzFmkN-UQ4FmccKcTUFb4,770
|
|
21
23
|
ScriptCollection/OCIImages/ConcreteImageHandlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
24
|
ScriptCollection/Resources/CultureChooser/CultureChooser.js,sha256=5-4pwGDq5j1UnpTZy850ZMoxlM9tYPeu781QpZBtCWM,951
|
|
23
25
|
ScriptCollection/Resources/CultureChooser/index.html,sha256=gxQzbrSp4WU52TqN-gcBEtz2gJXmmM14OwTSFtFVRvw,276
|
|
@@ -30,9 +32,9 @@ ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=Tpzgiz6m3-cYCkObZOG5Uu7oM-EMoWFzz
|
|
|
30
32
|
ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=-Ev9D3bZDlUk2WFQhcmvzQ3FCS97OdsVUd0koAdmpZc,7474
|
|
31
33
|
ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=Ajfy2pLajTuU6UpwItHt4C2a-gLF3gPc4z6BktL3Cio,22163
|
|
32
34
|
ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=f0Uq1cA_4LvmL72cal0crrbKF6PcxL13D9wBKuQ1YBw,2328
|
|
33
|
-
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=
|
|
35
|
+
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=ydRDpWmU-smCphGyTNuaQeiabWaWOUgzIVtuPRoia1s,101274
|
|
34
36
|
ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py,sha256=
|
|
37
|
+
ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py,sha256=VtaLumyZaoj1jwY1kaym8qmLlzjWZ0jfsc2A1U_Lkpg,12237
|
|
36
38
|
ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
39
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6Gd5pQpZCw4OQz6HWkPCSn5z__eUUEisABLDSxd0o,200
|
|
38
40
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
|
|
@@ -51,8 +53,10 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=9XK7XnbeOn
|
|
|
51
53
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
54
|
ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=S_9g9IliQzBBqTQquYj6gI1E3OlGfGZsxXw-mSEe-iA,1690
|
|
53
55
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
scriptcollection-4.2.
|
|
57
|
-
scriptcollection-4.2.
|
|
58
|
-
scriptcollection-4.2.
|
|
56
|
+
ScriptCollection/__pycache__/GeneralUtilities.cpython-311.pyc,sha256=vy34znIhp2WBvpxj8Ooll30segB1194IUl_tYi-eO3w,110241
|
|
57
|
+
ScriptCollection/__pycache__/__init__.cpython-311.pyc,sha256=eahP76xKGeVhw7p6P0oYe0ukpe_1L5fkFgXjMBuXPgQ,231
|
|
58
|
+
scriptcollection-4.2.79.dist-info/METADATA,sha256=T7vUDpbYDlP15STaNUMCG5Bx8ZmhhvyO6kzNhDcVyrE,7691
|
|
59
|
+
scriptcollection-4.2.79.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
60
|
+
scriptcollection-4.2.79.dist-info/entry_points.txt,sha256=27XwAJEcaMEc1be0Ec1vKHCbiU4Ziu8jKL-SqsrYOIQ,4680
|
|
61
|
+
scriptcollection-4.2.79.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
62
|
+
scriptcollection-4.2.79.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|