Files
Packer-Cn/command
Lucas Bajolet dad07c6097 hcp: keep map of build names for hcp tracking
To be able to track HCP builds during a Packer build, we need to
propagate the name used for registering the build to HCP.

This works out-of-the-box for JSON templates, as the build's name is
always the builder's, so there's no confusion on that.

For HCP templates however, there's a possibility for a template to
define a name for the build, which is returned by a CoreBuild's Name()
function, in addition to the source's Type/Name.
The builds are registered to HCP with the source.String() function
however, which does not contain the build's name. This prevents any
build containing a name to work, as their name/source.String does not
match.

The name we registered the build with is stored in a CoreBuild as the
Type attribute, but cannot be safely accessed, as builds are types
within the command as packersdk.Build, which only exposes Name() for
this purpose.

In order to circumvent this problem, and as a way to present a prototype
of solution that will likely have to be discussed before we merge it,
this commit hotfixes the issue.
2022-11-14 13:31:35 -05:00
..
2021-01-20 10:37:16 +01:00
2020-12-17 13:29:25 -08:00
2021-04-19 14:07:22 +02:00
2021-01-20 10:37:16 +01:00
2022-05-17 19:26:34 +02:00
2020-12-17 13:29:25 -08:00
2021-03-12 11:07:26 +01:00
2019-12-17 11:25:56 +01:00
2014-10-27 20:58:44 -07:00