Skip to content

Commit 4e4008c

Browse files
authored
Don't generate output files for non-target invocations (#1237)
1 parent 6abaa11 commit 4e4008c

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

core/src/main/python/wlsdeploy/util/target_configuration_helper.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,20 @@ def generate_all_output_files(model, aliases, credential_injector, model_context
113113
:param model_context: used to determine location and content for the output
114114
:param exception_type: the type of exception to throw if needed
115115
"""
116-
target_config = model_context.get_target_configuration()
117-
credential_cache = credential_injector.get_variable_cache()
116+
if model_context.is_targetted_config():
117+
target_config = model_context.get_target_configuration()
118+
credential_cache = credential_injector.get_variable_cache()
118119

119-
if target_config.generate_results_file():
120-
generate_results_json(model_context, credential_cache, model.get_model(), exception_type)
120+
if target_config.generate_results_file():
121+
generate_results_json(model_context, credential_cache, model.get_model(), exception_type)
121122

122-
if target_config.generate_output_files():
123-
# Generate k8s create secret script
124-
generate_k8s_script(model_context, credential_cache, model.get_model(), exception_type)
123+
if target_config.generate_output_files():
124+
# Generate k8s create secret script
125+
generate_k8s_script(model_context, credential_cache, model.get_model(), exception_type)
125126

126-
# create additional output files
127-
additional_output_helper.create_additional_output(model, model_context, aliases, credential_injector,
128-
exception_type)
127+
# create additional output files
128+
additional_output_helper.create_additional_output(model, model_context, aliases, credential_injector,
129+
exception_type)
129130

130131

131132
def _prepare_k8s_secrets(model_context, token_dictionary, model_dictionary):

0 commit comments

Comments
 (0)