gitops 0.9.21__tar.gz → 0.9.23__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitops
3
- Version: 0.9.21
3
+ Version: 0.9.23
4
4
  Summary: Manage multiple apps across one or more k8s clusters.
5
5
  License: BSD
6
6
  Author: Jarek Głowacki
@@ -10,6 +10,7 @@ Classifier: License :: Other/Proprietary License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
13
14
  Provides-Extra: server
14
15
  Requires-Dist: boto3
15
16
  Requires-Dist: colorama (>=0.4.4,<0.5.0)
@@ -5,7 +5,7 @@ from pathlib import Path
5
5
  from . import monkeypatches # NOQA
6
6
  from .utils.cli import success, warning
7
7
 
8
- __version__ = "0.9.21"
8
+ __version__ = "0.9.23"
9
9
 
10
10
 
11
11
  # Checking gitops version matches cluster repo version.
@@ -1,4 +1,5 @@
1
1
  import os
2
+ from pathlib import PosixPath
2
3
  from typing import List, Union
3
4
 
4
5
  from colorama import Fore
@@ -15,6 +16,12 @@ from .images import colour_image
15
16
  from .tags import colour_tags, validate_tags
16
17
 
17
18
 
19
+ def is_valid_app_directory(directory: PosixPath) -> bool:
20
+ files = ["deployment.yml", "secrets.yml"]
21
+ file_paths = [(directory / file).is_file() for file in files]
22
+ return all(file_paths)
23
+
24
+
18
25
  def get_app_details(app_name: str, load_secrets: bool = True) -> App:
19
26
  account_id = get_account_id() if load_secrets else "UNKNOWN"
20
27
  try:
@@ -89,6 +96,8 @@ def get_apps(
89
96
  for entry in directory:
90
97
  if not entry.is_dir():
91
98
  continue
99
+ elif not is_valid_app_directory(entry):
100
+ continue
92
101
  app = get_app_details(entry.name, load_secrets=load_secrets)
93
102
 
94
103
  pseudotags = [app.name, app.cluster]
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gitops"
3
- version = "0.9.21"
3
+ version = "0.9.23"
4
4
  description = "Manage multiple apps across one or more k8s clusters."
5
5
  authors = ["Jarek Głowacki <jarekwg@gmail.com>"]
6
6
  license = "BSD"
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