Commit Graph

7 Commits

Author SHA1 Message Date
Adrien Delorme 2af40c762b
HCL2: pass on builder type and name (#8956)
* sets `packer_build_name` and `packer_builder_type` variables for builder provisioners and post-processors in HCL2
* allows to use the new `${source.type}` and `${source.name}` variables in HCL2
* fixes #8932 

Note that the common.PackerConfig is used everywhere and was not set for HCL2, this had some implications: 

For #8923 you can see the issue here:

dde74232f2/builder/lxd/config.go (L61-L63)

More random examples of where this could cause an issue :

0785c2f6fc/provisioner/ansible-local/provisioner.go (L380-L381)

b4efd13a4d/builder/amazon/ebs/builder.go (L232-L236)



* [All references to PackerConfig.PackerBuildName](https://sourcegraph.com/github.com/hashicorp/packer@ff6a039d5bb45e34ff761d9c52e8b98972288447/-/blob/common/packer_config.go#L7:2&tab=references)

* [All references to PackerConfig.PackerBuilderType](https://sourcegraph.com/github.com/hashicorp/packer@ff6a039d5bb45e34ff761d9c52e8b98972288447/-/blob/common/packer_config.go#L8:2&tab=references)
2020-04-09 11:14:37 +02:00
Olivier Ceyral 4d10d668ee Add "custom_data" key to packer manifest 2019-02-01 10:41:34 +01:00
Vasiliy Tolstov 4868f5872e post-processor/manifest: add artifact file size to manifest
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-08-09 16:46:15 +03:00
Chris Bednarski 7a9c3bc2a0 Added -force truncation behavior for manifest, and added docs 2016-06-10 15:57:01 -07:00
Chris Bednarski 78070f8ca9 Removed input_type and description since these are not particularly useful 2016-06-10 15:57:01 -07:00
Chris Bednarski 3c6ca7cbde Added builder_type and build_name, renamed some other fields 2016-06-10 15:57:01 -07:00
Chris Bednarski db593a517d Added manifest post-processor, which creates a manifest of build artifacts 2016-06-10 15:57:01 -07:00