Skip to content

Commit

Permalink
Merge pull request #973 from kapicorp/fix_972
Browse files Browse the repository at this point in the history
Fix 972: handle compose_node_name
  • Loading branch information
ademariag authored Mar 21, 2023
2 parents 43916bb + 51f562b commit 0d611d9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kapitan/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@ def compile_targets(

# if '-t' is set on compile or only a few changed, only override selected targets
if updated_targets:
for target in updated_targets:
compile_path_target = os.path.join(compile_path, target)
temp_path_target = os.path.join(temp_compile_path, target)
for target in target_objs:
path = target["target_full_path"]
compile_path_target = os.path.join(compile_path, path)
temp_path_target = os.path.join(temp_compile_path, path)

os.makedirs(compile_path_target, exist_ok=True)

Expand Down Expand Up @@ -404,7 +405,7 @@ def load_target_inventory(inventory_path, targets, ignore_class_notfound=False):
raise InventoryError(
"InventoryError: {}: parameters.kapitan has no assignment".format(target_name)
)
target_obj["target_full_path"] = inv_target["__reclass__"]["node"].replace("./", "")
target_obj["target_full_path"] = inv_target["parameters"]["_reclass_"]["name"]["path"]
require_compile = not ignore_class_notfound
valid_target_obj(target_obj, require_compile)
validate_matching_target_name(target_name, target_obj, inventory_path)
Expand Down

0 comments on commit 0d611d9

Please sign in to comment.