packer-cn/builder/proxmox/common/step_success.go
Calle Pettersson 905869308d Split proxmox builder into a common part and iso/clone builders
Clone builder is still just a stub. Proof-of-concept for #9626

Signed-off-by: Calle Pettersson <calle@cape.nu>
2020-09-04 23:53:09 +02:00

23 lines
615 B
Go

package proxmox
import (
"context"
"github.com/hashicorp/packer/helper/multistep"
)
// stepSuccess runs after the full build has succeeded.
//
// It sets the success state, which ensures cleanup does not remove the finished template
type stepSuccess struct{}
func (s *stepSuccess) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
// We need to ensure stepStartVM.Cleanup doesn't delete the template (no
// difference between VMs and templates when deleting)
state.Put("success", true)
return multistep.ActionContinue
}
func (s *stepSuccess) Cleanup(state multistep.StateBag) {}