|
|
|
|
@ -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
|
|
|
|
|
|