Skip to content

Commit d908144

Browse files
committed
Merge branch 'fix-secprovider-customfiles-extraction' into 'main'
Fix archive custom files extraction orders See merge request weblogic-cloud/weblogic-deploy-tooling!1535
2 parents 343e8e7 + b9a160f commit d908144

File tree

5 files changed

+15
-30
lines changed

5 files changed

+15
-30
lines changed

core/src/main/python/create.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,12 @@ def main(model_context):
377377
if archive_file_name:
378378
domain_path = _get_domain_path(model_context, model_dictionary)
379379
archive_helper = ArchiveHelper(archive_file_name, domain_path, __logger, ExceptionType.CREATE)
380+
if archive_helper:
381+
if not os.path.exists(os.path.abspath(domain_path)):
382+
os.mkdir(os.path.abspath(domain_path))
380383

381-
if archive_helper:
382-
domain_parent = model_context.get_domain_parent_dir()
383-
domain_home = model_context.get_domain_home()
384-
if domain_parent and domain_home is None:
385-
domain_home = os.path.join(domain_parent, model_dictionary[model_constants.TOPOLOGY]['Name'])
386-
if not os.path.exists(os.path.abspath(domain_home)):
387-
os.mkdir(os.path.abspath(domain_home))
388-
389-
archive_helper.extract_all_database_wallets()
384+
archive_helper.extract_all_database_wallets()
385+
archive_helper.extract_custom_archive()
390386

391387
has_atp, has_ssl = validate_rcu_args_and_model(model_context, model_dictionary, archive_helper, aliases)
392388

core/src/main/python/update.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from wlsdeploy.tool.util import model_context_helper
2525
from wlsdeploy.tool.util import results_file
2626
from wlsdeploy.tool.util import wlst_helper
27+
from wlsdeploy.tool.util.archive_helper import ArchiveHelper
2728
from wlsdeploy.tool.util.wlst_helper import WlstHelper
2829
from wlsdeploy.tool.util.rcu_helper import RCUHelper
2930
from wlsdeploy.util import cla_helper
@@ -294,6 +295,15 @@ def main(model_context):
294295
model_dictionary = cla_helper.load_model(_program_name, model_context, aliases, "update", __wlst_mode,
295296
validate_crd_sections=False)
296297
model = Model(model_dictionary)
298+
299+
archive_file_name = model_context.get_archive_file_name()
300+
if archive_file_name:
301+
domain_path = model_context.get_domain_home()
302+
archive_helper = ArchiveHelper(archive_file_name, domain_path, __logger, ExceptionType.CREATE)
303+
if archive_helper:
304+
archive_helper.extract_all_database_wallets()
305+
archive_helper.extract_custom_archive()
306+
297307
_exit_code = __update(model, model_context, aliases)
298308
except DeployException, ex:
299309
_exit_code = ExitCode.ERROR

core/src/main/python/wlsdeploy/tool/create/domain_creator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@ def __create_domain(self):
469469

470470
self.library_helper.install_domain_libraries()
471471
self.library_helper.extract_classpath_libraries()
472-
self.library_helper.extract_custom_files()
473472
self.library_helper.install_domain_scripts()
474473
self.wlsroles_helper.process_roles()
475474

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ def update(self):
125125

126126
self.library_helper.install_domain_libraries()
127127
self.library_helper.extract_classpath_libraries()
128-
self.library_helper.extract_custom_files()
129128
self.library_helper.install_domain_scripts()
130129

131130
domain_home = self.model_context.get_domain_home()

core/src/main/python/wlsdeploy/tool/util/library_helper.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,6 @@ def extract_classpath_libraries(self):
8585
class_name=self.__class_name, method_name=_method_name)
8686
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)
8787

88-
def extract_custom_files(self):
89-
"""
90-
Extract any custom files in the archive to the domain home.
91-
:raises: BundleAwareException of the specified type: if an error occurs
92-
"""
93-
_method_name = 'extract_custom_files'
94-
95-
self.logger.entering(self.domain_home, class_name=self.__class_name, method_name=_method_name)
96-
if self.archive_helper is None:
97-
self.logger.info('WLSDPLY-12565', class_name=self.__class_name, method_name=_method_name)
98-
else:
99-
num_cp_libs = self.archive_helper.extract_custom_archive()
100-
if num_cp_libs > 0:
101-
self.logger.info('WLSDPLY-12566', num_cp_libs, self.domain_home,
102-
class_name=self.__class_name, method_name=_method_name)
103-
else:
104-
self.logger.info('WLSDPLY-12567', self.model_context.get_archive_file_name(),
105-
class_name=self.__class_name, method_name=_method_name)
106-
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)
10788

10889
def install_domain_scripts(self):
10990
"""

0 commit comments

Comments
 (0)