Fix for #212 - exception on non-stack deploy
This commit is contained in:
parent
d9a7ea19a3
commit
ecc4302c34
@ -185,8 +185,10 @@ def _make_cluster_context(ctx, include, exclude, cluster):
|
|||||||
stack_config = get_parsed_stack_config(ctx.stack)
|
stack_config = get_parsed_stack_config(ctx.stack)
|
||||||
# TODO: syntax check the input here
|
# TODO: syntax check the input here
|
||||||
pods_in_scope = stack_config['pods']
|
pods_in_scope = stack_config['pods']
|
||||||
|
cluster_config = stack_config['config'] if 'config' in stack_config else None
|
||||||
else:
|
else:
|
||||||
pods_in_scope = all_pods
|
pods_in_scope = all_pods
|
||||||
|
cluster_config = None
|
||||||
|
|
||||||
# Convert all pod definitions to v1.1 format
|
# Convert all pod definitions to v1.1 format
|
||||||
pods_in_scope = _convert_to_new_format(pods_in_scope)
|
pods_in_scope = _convert_to_new_format(pods_in_scope)
|
||||||
@ -223,8 +225,6 @@ def _make_cluster_context(ctx, include, exclude, cluster):
|
|||||||
if ctx.verbose:
|
if ctx.verbose:
|
||||||
print(f"files: {compose_files}")
|
print(f"files: {compose_files}")
|
||||||
|
|
||||||
cluster_config = stack_config['config'] if 'config' in stack_config else None
|
|
||||||
|
|
||||||
return cluster_context(cluster, compose_files, pre_start_commands, post_start_commands, cluster_config)
|
return cluster_context(cluster, compose_files, pre_start_commands, post_start_commands, cluster_config)
|
||||||
|
|
||||||
|
|
||||||
@ -276,7 +276,6 @@ def _orchestrate_cluster_config(ctx, cluster_config, docker, container_exec_env)
|
|||||||
destination_container: str
|
destination_container: str
|
||||||
destination_variable: str
|
destination_variable: str
|
||||||
|
|
||||||
|
|
||||||
if cluster_config is not None:
|
if cluster_config is not None:
|
||||||
for container in cluster_config:
|
for container in cluster_config:
|
||||||
container_config = cluster_config[container]
|
container_config = cluster_config[container]
|
||||||
|
@ -24,4 +24,11 @@ $TEST_TARGET_SO --stack test deploy-system up
|
|||||||
# TODO: test that we can use the deployed container somehow
|
# TODO: test that we can use the deployed container somehow
|
||||||
# Clean up
|
# Clean up
|
||||||
$TEST_TARGET_SO --stack test deploy-system down
|
$TEST_TARGET_SO --stack test deploy-system down
|
||||||
|
# Run same test but not using the stack definition
|
||||||
|
# Test building the a stack container
|
||||||
|
$TEST_TARGET_SO build-containers --include cerc/test-container
|
||||||
|
# Deploy the test container
|
||||||
|
$TEST_TARGET_SO deploy-system --include test up
|
||||||
|
# Clean up
|
||||||
|
$TEST_TARGET_SO deploy-system --include test down
|
||||||
echo "Test passed"
|
echo "Test passed"
|
||||||
|
Loading…
Reference in New Issue
Block a user