Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add build.name to hcl code #10114

Merged
merged 1 commit into from
Oct 16, 2020
Merged

add build.name to hcl code #10114

merged 1 commit into from
Oct 16, 2020

Conversation

SwampDragons
Copy link
Contributor

Build name and Source name are not the same thing in HCL -- while users can name builds, they previously had not way of accessing the buildname in variables. This adds a "name" key to the build accessor so that users can read out this var.

This checks off a box in #9176

@SwampDragons SwampDragons requested a review from a team as a code owner October 15, 2020 21:45
@codecov
Copy link

codecov bot commented Oct 15, 2020

Codecov Report

Merging #10114 into master will increase coverage by 0.00%.
The diff coverage is 25.00%.

Impacted Files Coverage Δ
hcl2template/types.hcl_provisioner.go 15.00% <0.00%> (-1.22%) ⬇️
hcl2template/types.packer_config.go 53.74% <100.00%> (+0.24%) ⬆️
builder/azure/dtl/tempname.go 68.75% <0.00%> (-6.25%) ⬇️
packer/plugin/client.go 80.35% <0.00%> (+0.44%) ⬆️
packer/rpc/mux_broker.go 65.09% <0.00%> (+3.77%) ⬆️
packer/rpc/server.go 95.45% <0.00%> (+4.54%) ⬆️

},
fileCheck: fileCheck{
expected: []string{
"pineapple.pizza.txt",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha

Copy link
Contributor

@azr azr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super good work ! The provisioner re-prepare probably made this a bit harder to dev as the value was overwritten !

If/when we go with an implementation where things are prepared only whey they are about to be launched (HCL2Core) then this will be a bit simpler 🙂 .

@azr azr merged commit 66b81d9 into master Oct 16, 2020
@azr azr deleted the build_name_hcl branch October 16, 2020 09:03
@SwampDragons SwampDragons added this to the 1.6.5 milestone Oct 19, 2020
@ghost
Copy link

ghost commented Nov 16, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants