Skip to content

Don't generate output files for non-target invocations #1237

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 1 commit into from
Nov 3, 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
21 changes: 11 additions & 10 deletions core/src/main/python/wlsdeploy/util/target_configuration_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,20 @@ def generate_all_output_files(model, aliases, credential_injector, model_context
:param model_context: used to determine location and content for the output
:param exception_type: the type of exception to throw if needed
"""
target_config = model_context.get_target_configuration()
credential_cache = credential_injector.get_variable_cache()
if model_context.is_targetted_config():
target_config = model_context.get_target_configuration()
credential_cache = credential_injector.get_variable_cache()

if target_config.generate_results_file():
generate_results_json(model_context, credential_cache, model.get_model(), exception_type)
if target_config.generate_results_file():
generate_results_json(model_context, credential_cache, model.get_model(), exception_type)

if target_config.generate_output_files():
# Generate k8s create secret script
generate_k8s_script(model_context, credential_cache, model.get_model(), exception_type)
if target_config.generate_output_files():
# Generate k8s create secret script
generate_k8s_script(model_context, credential_cache, model.get_model(), exception_type)

# create additional output files
additional_output_helper.create_additional_output(model, model_context, aliases, credential_injector,
exception_type)
# create additional output files
additional_output_helper.create_additional_output(model, model_context, aliases, credential_injector,
exception_type)


def _prepare_k8s_secrets(model_context, token_dictionary, model_dictionary):
Expand Down