Skip to content

Put skip archive and remote test into domain bin scripts #1191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from java.io import File

from oracle.weblogic.deploy.util import WLSDeployArchive
from oracle.weblogic.deploy.util import WLSDeployArchiveIOException
from oracle.weblogic.deploy.util import FileUtils

Expand Down Expand Up @@ -120,23 +121,28 @@ def get_user_env_scripts(self):
else:
archive_file = self._model_context.get_archive_file()
domain_bin = self._convert_path('bin')
if os.path.isdir(domain_bin):
if os.path.isdir(domain_bin) and not self._model_context.skip_archive:
search_directory = FileUtils.fixupFileSeparatorsForJython(os.path.join(domain_bin, "setUserOverrides*.*"))
_logger.finer('WLSDPLY-06425', search_directory, class_name=_class_name, method_name=_method_name)
file_list = glob.glob(search_directory)
if file_list:
_logger.finer('WLSDPLY-06423', domain_bin, class_name=_class_name, method_name=_method_name)
for entry in file_list:
try:
updated_name = archive_file.addDomainBinScript(entry)
except WLSDeployArchiveIOException, wioe:
de = exception_helper.create_discover_exception('WLSDPLY-06426', entry,
wioe.getLocalizedMessage())
_logger.throwing(class_name=_class_name, method_name=_method_name, error=de)
raise de

entries.append(updated_name)
_logger.finer('WLSDPLY-06424', entry, updated_name, class_name=_class_name,
if self._model_context.is_remote():
new_source_name = archive_file.getDomainBinScriptArchivePath(entry)
self.add_to_remote_map(entry, new_source_name,
WLSDeployArchive.ArchiveEntryType.DOMAIN_BIN.name())
else:
try:
updated_name = archive_file.addDomainBinScript(entry)
except WLSDeployArchiveIOException, wioe:
de = exception_helper.create_discover_exception('WLSDPLY-06426', entry,
wioe.getLocalizedMessage ())
_logger.throwing(class_name=_class_name, method_name=_method_name, error=de)
raise de

entries.append(updated_name)
_logger.finer('WLSDPLY-06424', entry, updated_name, class_name=_class_name,
method_name=_method_name)

_logger.exiting(class_name=_class_name, method_name=_method_name, result=entries)
Expand Down