fix artifact generation

This commit is contained in:
Matthew Hooker 2018-10-19 23:21:10 -07:00
parent 84bb5d2f6f
commit 420d0ebe3e
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
2 changed files with 1 additions and 6 deletions

View File

@ -2,8 +2,6 @@ package classic
import (
"fmt"
"github.com/hashicorp/go-oracle-terraform/compute"
)
// Artifact is an artifact implementation that contains Image List
@ -12,7 +10,6 @@ type Artifact struct {
MachineImageName string
MachineImageFile string
ImageListVersion int
driver *compute.ComputeClient
}
// BuilderId uniquely identifies the builder.

View File

@ -165,9 +165,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
return nil, rawErr.(error)
}
// TODO fix me
// If there is no snapshot, then just return
if _, ok := state.GetOk("snapshot"); !ok {
if _, ok := state.GetOk("machine_image"); !ok {
return nil, nil
}
@ -176,7 +175,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
ImageListVersion: state.Get("image_list_version").(int),
MachineImageName: state.Get("machine_image_name").(string),
MachineImageFile: state.Get("machine_image_file").(string),
driver: client,
}
return artifact, nil