todo and some clean up. correct values for machine image

This commit is contained in:
Matthew Hooker 2018-10-17 21:46:43 -07:00
parent b222d36669
commit 21f786d686
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
4 changed files with 5 additions and 4 deletions

View File

@ -121,6 +121,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
&stepCreateImage{
uploadImageCommand: b.config.BuilderUploadImageCommand,
destinationContainer: fmt.Sprintf("packer-pv-image-%s", runID),
imageName: b.config.ImageName,
},
&common.StepCleanupTempKeys{
Comm: &b.config.Comm,

View File

@ -83,10 +83,10 @@ func (s *stepCreateImage) Run(_ context.Context, state multistep.StateBag) multi
machineImageClient := client.MachineImages()
createMI := &compute.CreateMachineImageInput{
// Two-part name of the account
Account: "/Compute-identity_domain/cloud_storage",
Account: fmt.Sprintf("/Compute-%s/cloud_storage", config.IdentityDomain),
Description: "Packer generated TODO",
// The three-part name of the object
Name: "/Compute-identity_domain/user/object",
Name: config.Identifier(s.imageName),
// image_file.tar.gz, where image_file is the .tar.gz name of the machine image file that you have uploaded to Oracle Cloud Infrastructure Object Storage Classic.
File: fmt.Sprintf("%s.tar.gz", s.imageName),
}
@ -105,6 +105,8 @@ func (s *stepCreateImage) Run(_ context.Context, state multistep.StateBag) multi
4. Documentation
5. Configuration (master/builder images, entry, destination stuff, etc)
6. split master/builder image/connection config. i.e. build anything, master only linux
7. correct artifact
8. Delete upload container
*/
//machineImageClient.CreateMachineImage()

View File

@ -91,7 +91,6 @@ func (s *stepCreatePVBuilder) Cleanup(state multistep.StateBag) {
state.Put("error", err)
return
}
// TODO wait for instance state to change to deleted?
ui.Say("Terminated builder instance.")
}

View File

@ -92,6 +92,5 @@ func (s *stepCreatePVMaster) Cleanup(state multistep.StateBag) {
state.Put("error", err)
return
}
// TODO wait for instance state to change to deleted?
ui.Say("Terminated master instance.")
}