If no image is generated, just return nil for the Openstack provider
This mirrors what is done in other providers e.g. Amazon providers
This commit is contained in:
parent
a1b4887324
commit
f1eae75389
|
@ -112,6 +112,11 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
||||||
return nil, rawErr.(error)
|
return nil, rawErr.(error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If there are no images, then just return
|
||||||
|
if _, ok := state.GetOk("image"); !ok {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Build the artifact and return it
|
// Build the artifact and return it
|
||||||
artifact := &Artifact{
|
artifact := &Artifact{
|
||||||
ImageId: state.Get("image").(string),
|
ImageId: state.Get("image").(string),
|
||||||
|
|
Loading…
Reference in New Issue