Hi Megan, Thank you for your advice. I was very helpful for me. I can achieve to upload my box to Vagrant Cloud. I was sorry for such basic question. I would check the official document in advance next time.
Best regards, Yusuke 2019年10月5日土曜日 1時32分03秒 UTC+9 Megan Marsh: > > You are missing a set of brackets -- check the docs here > https://www.packer.io/docs/templates/post-processors.html and read about > sequence definitions. If you want post-processors to use artifacts from > previous post-processors, rather than artifacts from the original build, > you need to wrap them in a second set of brackets. E.g. > > "post-processors": [ > [ > { > "type": "vagrant", > "keep_input_artifact": false, > "output": "windows10_{{.Provider}}.box", > "vagrantfile_template": "vagrantfile-windows10.template" > }, > { > "type": "vagrant-cloud", > "box_tag": "ymasuda/windows10", > "access_token": "{{user `cloud_token`}}", > "version": "{{user `version`}}" > } > ] > ], > > On Fri, Oct 4, 2019 at 7:51 AM Yusuke Masuda <[email protected] > <javascript:>> wrote: > >> Hello, >> >> I try to upload my box with vagrant-cloud post-processor. >> But it failed with an error below. >> >> Build 'hyperv-iso' errored: 1 error(s) occurred: >> * Post-processor failed: Unknown artifact type, requires box from vagrant >> post-processor or vagrant builder: MSOpenTech.hyperv >> >> I configured my packer that it creates the box for hyperv using >> hyperv-iso builder and run the vagrant post-processor prior the >> vagrant-cloud post-processor. >> I am not sure but I expect that it can be worked as long as I am using >> the vagrant post-processor from the message showed. >> >> The post-processors part of my source code is: >> "post-processors": [ >> { >> "type": "vagrant", >> "keep_input_artifact": false, >> "output": "windows10_{{.Provider}}.box", >> "vagrantfile_template": "vagrantfile-windows10.template" >> }, >> { >> "type": "vagrant-cloud", >> "box_tag": "ymasuda/windows10", >> "access_token": "{{user `cloud_token`}}", >> "version": "{{user `version`}}" >> } >> ], >> >> I configured it following the example which showed in the vagrant-cloud >> page of the official help page. >> See whole packer template in >> https://github.com/yusukemasuda/packer-windows if you need. >> Please be aware the one that it is before adding the vagrant-cloud >> post-processor, I added the code above and its variables on it. >> >> I also took a look the packer source code in GitHub. >> >> https://github.com/hashicorp/packer/blob/master/post-processor/vagrant-cloud/post-processor.go >> var builtins = map[string]string{ >> "mitchellh.post-processor.vagrant": "vagrant", >> "packer.post-processor.artifice": "artifice", >> "vagrant": "vagrant", >> } >> : >> : >> func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, >> artifact packer.Artifact) (packer.Artifact, bool, bool, error) { >> if _, ok := builtins[artifact.BuilderId()]; !ok { >> return nil, false, false, fmt.Errorf( >> "Unknown artifact type, requires box from vagrant >> post-processor or vagrant builder: %s", artifact.BuilderId()) >> } >> >> >> Will it really work with just using vagrant post-processor, even if I use >> the hyperv builder? >> The source code seemingly expecting some combinations. >> >> Can I use vagrant-cloud post-processor even if I am using hyperv builder? >> >> >> Regards, >> >> Yusuke. >> >> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/mitchellh/packer/issues >> IRC: #packer-tool on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Packer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/ea037e68-b7d9-45d2-b0a2-4302b556e73d%40googlegroups.com >> >> <https://groups.google.com/d/msgid/packer-tool/ea037e68-b7d9-45d2-b0a2-4302b556e73d%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/be07a26f-ad5b-4d30-9d28-04d2ad2decce%40googlegroups.com.
