Skip to content

Commit ad9cad5

Browse files
committed
CH-207 fix images path - reverts CH-194
1 parent 796085f commit ad9cad5

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

tools/deployment-cli-tools/ch_cli_tools/codefresh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .models import HarnessMainConfig, ApplicationTestConfig, ApplicationHarnessConfig
1212
from cloudharness_utils.constants import *
1313
from .configurationgenerator import KEY_APPS, KEY_TASK_IMAGES, KEY_TEST_IMAGES
14-
from .utils import check_image_exists_in_registry, clean_image_name, find_dockerfiles_paths, get_app_relative_to_base_path, guess_build_dependencies_from_dockerfile, \
14+
from .utils import check_image_exists_in_registry, find_dockerfiles_paths, get_app_relative_to_base_path, guess_build_dependencies_from_dockerfile, \
1515
get_image_name, get_template, dict_merge, app_name_from_path, clean_path
1616
from cloudharness_utils.testing.api import get_api_filename, get_schemathesis_command, get_urls_from_api_file
1717

@@ -132,7 +132,7 @@ def create_codefresh_deployment_scripts(root_paths, envs=(), include=(), exclude
132132
for i in range(len(root_paths)):
133133

134134
root_path = root_paths[i]
135-
base_name = clean_image_name(basename(abspath(root_path))) if i < len(root_paths) - (2 if has_overrides else 1) else base_image_name
135+
base_name = base_image_name
136136

137137
for e in envs:
138138

tools/deployment-cli-tools/ch_cli_tools/configurationgenerator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
DEPLOYMENT_CONFIGURATION_PATH, BASE_IMAGES_PATH, STATIC_IMAGES_PATH
1818
from .utils import get_cluster_ip, env_variable, get_sub_paths, guess_build_dependencies_from_dockerfile, image_name_from_dockerfile_path, \
1919
get_template, merge_configuration_directories, dict_merge, app_name_from_path, \
20-
find_dockerfiles_paths, clean_image_name
20+
find_dockerfiles_paths
2121

2222

2323
KEY_HARNESS = 'harness'
@@ -96,7 +96,7 @@ def _adjust_missing_values(self, helm_values):
9696
def _process_applications(self, helm_values, base_image_name=None):
9797
for i in range(len(self.root_paths)):
9898
root_path = self.root_paths[i]
99-
base_name = clean_image_name(root_path.name) if i < len(self.root_paths) - 1 else base_image_name
99+
base_name = base_image_name
100100
app_values = init_app_values(
101101
root_path, exclude=self.exclude, values=helm_values[KEY_APPS])
102102
helm_values[KEY_APPS] = dict_merge(helm_values[KEY_APPS],
@@ -152,7 +152,7 @@ def collect_app_values(self, app_base_path, base_image_name=None, helm_values=No
152152
def _init_static_images(self, base_image_name):
153153
for i in range(len(self.root_paths)):
154154
root_path = self.root_paths[i]
155-
base_name = clean_image_name(root_path.name) if i < len(self.root_paths) - 1 else base_image_name
155+
base_name = base_image_name
156156
for static_img_dockerfile in find_dockerfiles_paths(os.path.join(root_path, STATIC_IMAGES_PATH)):
157157
self.static_images.add(static_img_dockerfile)
158158

@@ -185,7 +185,7 @@ def _assign_static_build_dependencies(self, helm_values):
185185
def _init_base_images(self, base_image_name):
186186
for i in range(len(self.root_paths)):
187187
root_path = self.root_paths[i]
188-
base_name = clean_image_name(root_path.name) if i < len(self.root_paths) - 1 else base_image_name
188+
base_name = base_image_name
189189

190190
for base_img_dockerfile in self.__find_static_dockerfile_paths(root_path):
191191
img_name = image_name_from_dockerfile_path(
@@ -201,7 +201,7 @@ def _init_test_images(self, base_image_name):
201201
test_images = {}
202202
for i in range(len(self.root_paths)):
203203
root_path = self.root_paths[i]
204-
base_name = clean_image_name(root_path.name) if i < len(self.root_paths) - 1 else base_image_name
204+
base_name = base_image_name
205205

206206
for base_img_dockerfile in find_dockerfiles_paths(os.path.join(root_path, TEST_IMAGES_PATH)):
207207
img_name = image_name_from_dockerfile_path(

0 commit comments

Comments
 (0)