Fix repo root path calculation (4 parents from stack path)
parent
22d64f1e97
commit
4408725b08
|
|
@ -322,13 +322,14 @@ def restart(ctx, stack_path, spec_file, config_file, force, expected_ip):
|
||||||
|
|
||||||
# Determine spec file location
|
# Determine spec file location
|
||||||
# Priority: --spec-file argument > repo's deployment/spec.yml > deployment dir
|
# Priority: --spec-file argument > repo's deployment/spec.yml > deployment dir
|
||||||
|
# Stack path is like: repo/stack_orchestrator/data/stacks/stack-name
|
||||||
|
# So repo root is 4 parents up
|
||||||
|
repo_root = stack_source.parent.parent.parent.parent
|
||||||
if spec_file:
|
if spec_file:
|
||||||
# Spec file relative to repo root
|
# Spec file relative to repo root
|
||||||
repo_root = stack_source.parent.parent.parent # Go up from stack path
|
|
||||||
spec_file_path = repo_root / spec_file
|
spec_file_path = repo_root / spec_file
|
||||||
else:
|
else:
|
||||||
# Try standard GitOps location in repo
|
# Try standard GitOps location in repo
|
||||||
repo_root = stack_source.parent.parent.parent
|
|
||||||
gitops_spec = repo_root / "deployment" / "spec.yml"
|
gitops_spec = repo_root / "deployment" / "spec.yml"
|
||||||
if gitops_spec.exists():
|
if gitops_spec.exists():
|
||||||
spec_file_path = gitops_spec
|
spec_file_path = gitops_spec
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue