Skip to content

Commit 83c8546

Browse files
committed
Add compute versioned name in app deployment
1 parent f3b17c1 commit 83c8546

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

core/src/main/python/wlsdeploy/tool/deploy/applications_deployer.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,29 @@ def __add_applications(self):
158158

159159
application = \
160160
copy.deepcopy(dictionary_utils.get_dictionary_element(applications, application_name))
161+
162+
app_source_path = dictionary_utils.get_element(application, SOURCE_PATH)
163+
if string_utils.is_empty(app_source_path):
164+
ex = exception_helper.create_deploy_exception('WLSDPLY-09302', application_name, SOURCE_PATH)
165+
self.logger.throwing(ex, class_name=self._class_name, method_name=_method_name)
166+
raise ex
167+
168+
if deployer_utils.is_path_into_archive(app_source_path):
169+
if self.archive_helper is not None:
170+
self.archive_helper.extract_file(app_source_path)
171+
else:
172+
ex = exception_helper.create_deploy_exception('WLSDPLY-09303', application_name)
173+
self.logger.throwing(ex, class_name=self._class_name, method_name=_method_name)
174+
raise ex
175+
full_source_path = File(File(self.model_context.get_domain_home()), app_source_path).getAbsolutePath()
176+
else:
177+
full_source_path = File(self.model_context.replace_token_string(app_source_path)).getAbsolutePath()
178+
179+
print 'DEBUG before: ' + application_name
180+
application_name = \
181+
self.__get_deployable_library_versioned_name(full_source_path, application_name)
182+
183+
print 'DEBUG after: ' + application_name
161184
quoted_application_name = self.wlst_helper.get_quoted_name_for_wlst(application_name)
162185
application_location.add_name_token(application_token, quoted_application_name)
163186

@@ -732,9 +755,9 @@ def __deploy_app_online(self, application_name, source_path, targets, plan=None,
732755
self.logger.throwing(ex, class_name=self._class_name, method_name=_method_name)
733756
raise ex
734757

735-
if options is not None and 'libraryModule' in options and string_utils.to_boolean(options['libraryModule']):
736-
computed_name = self.__get_deployable_library_versioned_name(source_path, application_name)
737-
application_name = computed_name
758+
# if options is not None and 'libraryModule' in options and string_utils.to_boolean(options['libraryModule']):
759+
computed_name = self.__get_deployable_library_versioned_name(source_path, application_name)
760+
application_name = computed_name
738761

739762
# build the dictionary of named arguments to pass to the deploy_application method
740763
args = list()

0 commit comments

Comments
 (0)