Overview of the Issue
Cannot pass checksum while uploading vagrant box
Reproduction Steps
Steps to reproduce this issue
# Upload the box to Vagrant Registry
post-processor "vagrant-registry" {
client_id = "${var.hcp_client_id}"
client_secret = "${var.hcp_client_secret}"
box_tag = "utm/${var.box_name}"
version = "${var.version}"
architecture = "${var.os_arch == "x86_64" ? "amd64" : var.os_arch == "aarch64" ? "arm64" : var.os_arch}"
# There is no way to pass , check sum generated from previous steps, please provide some way
# So it is hard coded out of no choice
box_checksum = "sha512:989b3083771a68e55d08851af0be122c2b3f5efc0eb48ed1385cafb650ae1ec9b073d9434f8ff3904f828f9e80791ff39c5f6a15960fd1d5cf7252da6e0c52b7"
}
Even with box_checksum is passed in proper format , the build just fails with error
error: Failure creating new architecture: checksum: value: checksum must not be set when type is NONE
From debugging, I found the issue is not with the vagrant plugin , but with packer-sdk. I'm reporting here because this is where users consume those models from sdk.
Issue happens here :
|
state.Put("error", fmt.Errorf("Failure creating new architecture: %s", errMsg)) |
Plugin and Packer version
Packer v1.11.1
packer-plugin-vagrant_v1.1.6
Operating system and Environment details
OS, Architecture, and any other information you can provide about the
environment.
sw_vers
ProductName: macOS
ProductVersion: 14.6.1
BuildVersion: 23G93
Log Fragments and crash.log files
Overview of the Issue
Cannot pass checksum while uploading vagrant box
Reproduction Steps
Steps to reproduce this issue
Even with box_checksum is passed in proper format , the build just fails with error
From debugging, I found the issue is not with the vagrant plugin , but with packer-sdk. I'm reporting here because this is where users consume those models from sdk.
Issue happens here :
packer-plugin-vagrant/post-processor/hcp-vagrant-registry/step_create_architecture.go
Line 110 in 053b1ca
Plugin and Packer version
Packer v1.11.1
packer-plugin-vagrant_v1.1.6
Operating system and Environment details
OS, Architecture, and any other information you can provide about the
environment.
Log Fragments and crash.log files