Conversation
5f5034e to
591a9b7
Compare
4bfe2bf to
8fead8c
Compare
sylviamoss
left a comment
There was a problem hiding this comment.
LGTM! 👍🏼
As for the artifact.Destroy(), I wouldn't destroy it if it fails unless this is explicitly desired. My thought is that it can be a good source for debugging 🤔 What do you think?
e6db430 to
24976a7
Compare
Yeah, that is a good point. This also may lead the way to adding some sort of import of existing image data to the registry functionality. Once we have a clear way to fail a build if the builder or post-process is not HCP Packer registry capable the need for destroying will not be necessary. I like your idea of not doing anything unless explicitly desired. Thanks! |
This change uses the github.com/hashicorp/packer-plgin-sdk/packer/registryimage for querying Artifact State for HCP Registry Image metadata. To handle the conversion of the RPC response, mapstructure was introduced to conversion state data into an registryimage.Image before publishing to a image bucket.
24976a7 to
6469188
Compare
* The latest release of Amazon, GoogleCompute, and Azure have support for publishing images to the HCP Packer registry.
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
This version of Packer core has been updated with new error handling to fail a build if Packer is unable to decode or publish image metadata to the HCP Packer Registry. These changes use the development version of hashicorp/packer-plugin-sdk#76.
In these changes the
RegistryBuilderandRegistryPostProcessorhave been updated to used mapstructure for decoding all Artifact State data that is to be sent to HCP Packer Registry. If decoding fails for whatever reason the build fails and no data is published to HCP Packer Registry - open question is should we call artifact.Destroy() on publishing image errors?Lastly, this change renames the packer_registry pkg to just registry. All references to the package are still set as packerregistry but the imports have been updated.
This change also vendors the latest versions of Amazon, GoogleCompute and Azure Arm plugins for the the private beta release.