mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-09 00:32:09 -04:00
Remove GetMetadata from StartBuild and add to CompleteBuild for HCL (#12926)
This commit is contained in:
parent
70d2efec4d
commit
f19b9b7369
1 changed files with 5 additions and 5 deletions
|
|
@ -71,11 +71,6 @@ func (h *HCLRegistry) StartBuild(ctx context.Context, build sdkpacker.Build) err
|
|||
name = cb.Type
|
||||
}
|
||||
|
||||
metadata := cb.GetMetadata()
|
||||
err := h.bucket.Version.AddMetadataToBuild(ctx, name, metadata)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return h.bucket.startBuild(ctx, name)
|
||||
}
|
||||
|
||||
|
|
@ -92,6 +87,11 @@ func (h *HCLRegistry) CompleteBuild(
|
|||
buildName = cb.Type
|
||||
}
|
||||
|
||||
metadata := cb.GetMetadata()
|
||||
err := h.bucket.Version.AddMetadataToBuild(ctx, buildName, metadata)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return h.bucket.completeBuild(ctx, buildName, artifacts, buildErr)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue