move tmp helper func into packer-plugin-sdk
This commit is contained in:
parent
4ead224c3b
commit
1ffc358ada
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/communicator"
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
// StepStartTunnel represents a Packer build step that launches an IAP tunnel
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
type StepCreateBuildDir struct {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"syscall"
|
||||
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
type LxcAttachCommunicator struct {
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/communicator"
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"syscall"
|
||||
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
// Communicator is a special communicator that works by executing
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
|
||||
"github.com/ChrisTrenkamp/goxpath"
|
||||
"github.com/ChrisTrenkamp/goxpath/tree/xmltree"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
// Parallels9Driver is a base type for Parallels builders.
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
// This step attaches the ISO to the virtual machine.
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
var additionsVersionMap = map[string]string{
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
type vmxTemplateData struct {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
vmwcommon "github.com/hashicorp/packer/builder/vmware/common"
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
// StepCloneVMX takes a VMX file and clones the VM into the output directory.
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
|
||||
"github.com/hashicorp/packer/common"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
// Communicator is a special communicator that works by executing
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/hashicorp/packer/common/shell-local/localexec"
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
// StepCreateCD will create a CD disk with the given files.
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
"github.com/mitchellh/go-fs"
|
||||
"github.com/mitchellh/go-fs/fat"
|
||||
)
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
urlhelper "github.com/hashicorp/go-getter/v2/helper/url"
|
||||
"github.com/hashicorp/packer/helper/multistep"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
var _ multistep.Step = new(StepDownload)
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/hashicorp/packer/common/commonsteps"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
func Run(ctx context.Context, ui packer.Ui, config *Config, generatedData map[string]interface{}) (bool, error) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package communicator
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
func TestPEM(t *testing.T) string {
|
||||
|
|
2
main.go
2
main.go
|
@ -19,8 +19,8 @@ import (
|
|||
"github.com/hashicorp/go-uuid"
|
||||
"github.com/hashicorp/packer/command"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
"github.com/hashicorp/packer/packer/plugin"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/version"
|
||||
"github.com/mitchellh/cli"
|
||||
"github.com/mitchellh/panicwrap"
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
"github.com/pkg/sftp"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"golang.org/x/crypto/ssh/agent"
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"strings"
|
||||
|
||||
multierror "github.com/hashicorp/go-multierror"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
)
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ import (
|
|||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
packrpc "github.com/hashicorp/packer/packer/rpc"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
)
|
||||
|
||||
// This is a count of the number of interrupts the process has received.
|
||||
|
|
|
@ -20,7 +20,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/config"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
"github.com/hashicorp/packer/post-processor/artifice"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
)
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"runtime"
|
||||
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
"github.com/klauspost/pgzip"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/config"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
const DefaultStagingDir = "/tmp/packer-provisioner-ansible-local"
|
||||
|
|
|
@ -36,7 +36,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/config"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/config"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
var retryableSleep = 2 * time.Second
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/config"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/hashicorp/packer/helper/config"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate"
|
||||
"github.com/hashicorp/packer/packer/tmp"
|
||||
"github.com/hashicorp/packer/packer-plugin-sdk/tmp"
|
||||
)
|
||||
|
||||
//FIXME query remote host or use %SYSTEMROOT%, %TEMP% and more creative filename
|
||||
|
|
Loading…
Reference in New Issue