Fixes per code review
This commit is contained in:
parent
d796edc783
commit
2868971a9b
|
@ -254,14 +254,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
return nil, errors.New("Build was halted.")
|
||||
}
|
||||
|
||||
osType := "Linux"
|
||||
if b.config.OSType == constants.Target_Windows {
|
||||
osType = "Windows"
|
||||
}
|
||||
|
||||
if b.config.isManagedImage() {
|
||||
managedImageID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/images/%s", b.config.SubscriptionID, b.config.ManagedImageResourceGroupName, b.config.ManagedImageName)
|
||||
return NewManagedImageArtifact(osType, b.config.ManagedImageResourceGroupName, b.config.ManagedImageName, b.config.manageImageLocation, managedImageID)
|
||||
return NewManagedImageArtifact(b.config.OSType, b.config.ManagedImageResourceGroupName, b.config.ManagedImageName, b.config.manageImageLocation, managedImageID)
|
||||
} else if template, ok := b.stateBag.GetOk(constants.ArmCaptureTemplate); ok {
|
||||
return NewArtifact(
|
||||
template.(*CaptureTemplate),
|
||||
|
@ -273,7 +268,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
sasUrl, _ := blob.GetSASURI(options)
|
||||
return sasUrl
|
||||
},
|
||||
osType)
|
||||
b.config.OSType)
|
||||
}
|
||||
|
||||
return &Artifact{}, nil
|
||||
|
|
|
@ -31,8 +31,8 @@ Currently, the Vagrant post-processor can create boxes for the following
|
|||
providers.
|
||||
|
||||
- AWS
|
||||
- Azure
|
||||
- DigitalOcean
|
||||
- Google
|
||||
- Azure
|
||||
- Hyper-V
|
||||
- LXC
|
||||
|
@ -107,9 +107,9 @@ where it will be set to 0.
|
|||
The available provider names are:
|
||||
|
||||
- `aws`
|
||||
- `azure`
|
||||
- `digitalocean`
|
||||
- `google`
|
||||
- `azure`
|
||||
- `hyperv`
|
||||
- `parallels`
|
||||
- `libvirt`
|
||||
|
|
Loading…
Reference in New Issue