qubership-pipelines-common-library 0.1.5__tar.gz → 0.1.7__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.
Files changed (29) hide show
  1. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/PKG-INFO +3 -1
  2. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/pyproject.toml +2 -1
  3. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/git_client.py +20 -2
  4. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/utils/utils_string.py +5 -1
  5. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/LICENSE +0 -0
  6. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/README.md +0 -0
  7. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/__init__.py +0 -0
  8. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/__init__.py +0 -0
  9. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/artifactory_client.py +0 -0
  10. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/execution/__init__.py +0 -0
  11. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/execution/exec_command.py +0 -0
  12. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/execution/exec_context.py +0 -0
  13. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/execution/exec_context_file.py +0 -0
  14. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/execution/exec_info.py +0 -0
  15. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/execution/exec_logger.py +0 -0
  16. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/github_client.py +0 -0
  17. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/gitlab_client.py +0 -0
  18. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/jenkins_client.py +0 -0
  19. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/kube_client.py +0 -0
  20. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/log_client.py +0 -0
  21. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/minio_client.py +0 -0
  22. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/utils/__init__.py +0 -0
  23. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/utils/rest.py +0 -0
  24. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/utils/utils.py +0 -0
  25. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/utils/utils_context.py +0 -0
  26. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/utils/utils_dictionary.py +0 -0
  27. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/utils/utils_file.py +0 -0
  28. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/utils/utils_json.py +0 -0
  29. {qubership_pipelines_common_library-0.1.5 → qubership_pipelines_common_library-0.1.7}/qubership_pipelines_common_library/v1/webex_client.py +0 -0
@@ -1,10 +1,12 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: qubership-pipelines-common-library
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Qubership Pipelines common library
5
+ License: Apache-2.0
5
6
  Author: Igor Lebedev
6
7
  Author-email: lebedev.light@gmail.com
7
8
  Requires-Python: >=3.11,<4.0
9
+ Classifier: License :: OSI Approved :: Apache Software License
8
10
  Classifier: Programming Language :: Python :: 3
9
11
  Classifier: Programming Language :: Python :: 3.11
10
12
  Classifier: Programming Language :: Python :: 3.12
@@ -1,9 +1,10 @@
1
1
  [tool.poetry]
2
2
  name = "qubership-pipelines-common-library"
3
- version = "0.1.5"
3
+ version = "0.1.7"
4
4
  description = "Qubership Pipelines common library"
5
5
  authors = ["Igor Lebedev <lebedev.light@gmail.com>"]
6
6
  readme = "README.md"
7
+ license = "Apache-2.0"
7
8
  packages = [{include = "qubership_pipelines_common_library"}]
8
9
 
9
10
  [tool.poetry.dependencies]
@@ -39,7 +39,7 @@ class GitClient:
39
39
  self.branch = None # last processed branch
40
40
  logging.info("Git Client configured for %s", self.host)
41
41
 
42
- def clone(self, repo_path: str, branch: str, temp_path: str):
42
+ def clone(self, repo_path: str, branch: str, temp_path: str, **kwargs):
43
43
  """"""
44
44
  repo_path = repo_path.lstrip("/").rstrip("/")
45
45
  if not repo_path:
@@ -56,9 +56,14 @@ class GitClient:
56
56
  self._gen_repo_auth_url(self.host, self.username, self.password, self.repo_path),
57
57
  temp_path,
58
58
  branch=branch,
59
+ **kwargs
59
60
  )
60
61
 
61
62
  def commit_and_push(self, commit_message: str):
63
+ self.commit(commit_message)
64
+ self.push()
65
+
66
+ def commit(self, commit_message: str):
62
67
  """"""
63
68
  if not self._is_cloned():
64
69
  raise Exception("Cannot commit without preliminary cloning")
@@ -72,7 +77,20 @@ class GitClient:
72
77
  self.repo.config_writer().set_value("user", "name", self.username).release()
73
78
  self.repo.config_writer().set_value("user", "email", self.email).release()
74
79
  self.repo.git.commit('-a', '-m', commit_message)
75
- self.repo.git.push(self.repo.remote().name, self.repo.active_branch.name)
80
+
81
+ def push(self):
82
+ """"""
83
+ if not self._is_cloned():
84
+ raise Exception("Cannot push without preliminary cloning")
85
+ logging.debug(f"Push into remote = {self.repo.remote().name} and branch = {self.repo.active_branch.name}")
86
+ self.repo.git.push(self.repo.remote().name, self.repo.active_branch.name)
87
+
88
+ def pull(self, **kwargs):
89
+ """"""
90
+ if not self._is_cloned():
91
+ raise Exception("Cannot pull without preliminary cloning")
92
+ logging.debug(f"Pull with options: {kwargs}")
93
+ self.repo.git.pull(**kwargs)
76
94
 
77
95
  def get_file_content_utf8(self, relative_path: str):
78
96
  """"""
@@ -21,4 +21,8 @@ class UtilsString:
21
21
  # split by newline, comma, or semicolon
22
22
  parts = re.split(r'[\n,;]', input_str)
23
23
  # trim whitespace from each part
24
- return [part.strip() for part in parts if part.strip()]
24
+ return [part.strip() for part in parts if part.strip()]
25
+
26
+ @staticmethod
27
+ def convert_to_bool(input_str):
28
+ return str(input_str).strip().lower() == "true"