Commit 2c7ad38 1 parent 7fd0e3f commit 2c7ad38 Copy full SHA for 2c7ad38
File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ def validate_resources(resources)
305
305
end
306
306
raise FatalDeploymentError
307
307
end
308
- rescue FatalDeploymentError
308
+ rescue FatalDeploymentError => err
309
309
raise FatalDeploymentError , "Template validation failed"
310
310
end
311
311
measure_method ( :validate_resources )
@@ -317,9 +317,11 @@ def validate_globals(resources)
317
317
end
318
318
global_names = FormattedLogger . indent_four ( global_names . join ( "\n " ) )
319
319
320
+ message = "This command is namespaced and cannot be used to deploy global resources. " \
321
+ "Use GlobalDeployTask instead."
322
+ @logger . summary . add_paragraph ( ColorizedString . new ( message ) . yellow )
320
323
@logger . summary . add_paragraph ( ColorizedString . new ( "Global resources:\n #{ global_names } " ) . yellow )
321
- raise FatalDeploymentError , "This command is namespaced and cannot be used to deploy global resources. " \
322
- "Use GlobalDeployTask instead."
324
+ raise FatalDeploymentError
323
325
end
324
326
325
327
def validate_dry_run ( resources )
Original file line number Diff line number Diff line change @@ -789,7 +789,7 @@ def test_output_when_switching_labels_incorrectly
789
789
assert_deploy_failure ( result )
790
790
791
791
assert_logs_match_all ( [
792
- "Command failed: apply -f " ,
792
+ "Template validation failed " ,
793
793
/The Deployment "web" is invalid.*`selector` does not match template `labels`/ ,
794
794
] , in_order : true )
795
795
end
You can’t perform that action at this time.
0 commit comments