Commit Graph
10 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:

https://github.com/hashicorp/packer/blob/dde74232f251434715cb76664426d9c1e1c91bd8/builder/lxd/config.go#L61-L63

More random examples of where this could cause an issue :

https://github.com/hashicorp/packer/blob/0785c2f6fca9c22bf25528e0176042799dd79df9/provisioner/ansible-local/provisioner.go#L380-L381

https://github.com/hashicorp/packer/blob/b4efd13a4d69a937a22caa5dd84eb98f7fdce5cf/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
Jeff Escalante 23a5c472aa remove sidebar_current from front matter 2020-04-07 17:53:25 -04:00
Jeff Escalante 18511bab05 bunch more broken link fixes 2020-04-07 17:53:21 -04:00
Jeff Escalante af257c2bb9 fix all local relative links 2020-04-07 17:50:53 -04:00
Jeff Escalante 090df9c2b6 code block language cleanup 2020-04-07 17:50:52 -04:00
Jeff Escalante 4afd107eeb patch source files for extensions changes 2020-04-07 17:50:51 -04:00
Jeff Escalante d626cedd45 remove unnecessary .html extensions 2020-04-07 17:50:51 -04:00
Jeff Escalante ace31df874 docs pages navigation 2020-04-07 17:50:49 -04:00
Jeff Escalante bcc848a83d were rendering yay 2020-04-07 17:50:47 -04:00
Jeff Escalante 92d4553890 initial port 2020-04-07 17:50:46 -04:00