Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
84189f7a
Commit
84189f7a
authored
Jun 22, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/*: properly save interpolation context
parent
d6004564
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
48 additions
and
38 deletions
+48
-38
builder/amazon/chroot/builder.go
builder/amazon/chroot/builder.go
+6
-6
builder/amazon/chroot/step_mount_device.go
builder/amazon/chroot/step_mount_device.go
+1
-1
builder/amazon/ebs/builder.go
builder/amazon/ebs/builder.go
+7
-7
builder/amazon/instance/builder.go
builder/amazon/instance/builder.go
+7
-7
builder/amazon/instance/step_bundle_volume.go
builder/amazon/instance/step_bundle_volume.go
+1
-1
builder/amazon/instance/step_upload_bundle.go
builder/amazon/instance/step_upload_bundle.go
+1
-1
builder/digitalocean/config.go
builder/digitalocean/config.go
+5
-4
builder/docker/config.go
builder/docker/config.go
+3
-2
builder/googlecompute/config.go
builder/googlecompute/config.go
+3
-2
builder/openstack/builder.go
builder/openstack/builder.go
+2
-1
builder/parallels/iso/builder.go
builder/parallels/iso/builder.go
+2
-1
builder/parallels/pvm/config.go
builder/parallels/pvm/config.go
+2
-1
builder/qemu/builder.go
builder/qemu/builder.go
+2
-1
builder/virtualbox/ovf/config.go
builder/virtualbox/ovf/config.go
+2
-1
builder/vmware/iso/builder.go
builder/vmware/iso/builder.go
+2
-1
builder/vmware/vmx/config.go
builder/vmware/vmx/config.go
+2
-1
No files found.
builder/amazon/chroot/builder.go
View file @
84189f7a
...
@@ -35,7 +35,7 @@ type Config struct {
...
@@ -35,7 +35,7 @@ type Config struct {
MountPath
string
`mapstructure:"mount_path"`
MountPath
string
`mapstructure:"mount_path"`
SourceAmi
string
`mapstructure:"source_ami"`
SourceAmi
string
`mapstructure:"source_ami"`
ctx
*
interpolate
.
Context
ctx
interpolate
.
Context
}
}
type
wrappedCommandTemplate
struct
{
type
wrappedCommandTemplate
struct
{
...
@@ -48,10 +48,10 @@ type Builder struct {
...
@@ -48,10 +48,10 @@ type Builder struct {
}
}
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
b
.
config
.
ctx
=
&
interpolate
.
Context
{
Funcs
:
awscommon
.
TemplateFuncs
}
b
.
config
.
ctx
.
Funcs
=
awscommon
.
TemplateFuncs
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
b
.
config
.
ctx
,
InterpolateContext
:
&
b
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"command_wrapper"
,
"command_wrapper"
,
...
@@ -96,8 +96,8 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
...
@@ -96,8 +96,8 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
// Accumulate any errors
// Accumulate any errors
var
errs
*
packer
.
MultiError
var
errs
*
packer
.
MultiError
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AccessConfig
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AccessConfig
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AMIConfig
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AMIConfig
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
for
_
,
mounts
:=
range
b
.
config
.
ChrootMounts
{
for
_
,
mounts
:=
range
b
.
config
.
ChrootMounts
{
if
len
(
mounts
)
!=
3
{
if
len
(
mounts
)
!=
3
{
...
@@ -132,7 +132,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
...
@@ -132,7 +132,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
ec2conn
:=
ec2
.
New
(
config
)
ec2conn
:=
ec2
.
New
(
config
)
wrappedCommand
:=
func
(
command
string
)
(
string
,
error
)
{
wrappedCommand
:=
func
(
command
string
)
(
string
,
error
)
{
ctx
:=
*
b
.
config
.
ctx
ctx
:=
b
.
config
.
ctx
ctx
.
Data
=
&
wrappedCommandTemplate
{
Command
:
command
}
ctx
.
Data
=
&
wrappedCommandTemplate
{
Command
:
command
}
return
interpolate
.
Render
(
b
.
config
.
CommandWrapper
,
&
ctx
)
return
interpolate
.
Render
(
b
.
config
.
CommandWrapper
,
&
ctx
)
}
}
...
...
builder/amazon/chroot/step_mount_device.go
View file @
84189f7a
...
@@ -33,7 +33,7 @@ func (s *StepMountDevice) Run(state multistep.StateBag) multistep.StepAction {
...
@@ -33,7 +33,7 @@ func (s *StepMountDevice) Run(state multistep.StateBag) multistep.StepAction {
device
:=
state
.
Get
(
"device"
)
.
(
string
)
device
:=
state
.
Get
(
"device"
)
.
(
string
)
wrappedCommand
:=
state
.
Get
(
"wrappedCommand"
)
.
(
CommandWrapper
)
wrappedCommand
:=
state
.
Get
(
"wrappedCommand"
)
.
(
CommandWrapper
)
ctx
:=
*
config
.
ctx
ctx
:=
config
.
ctx
ctx
.
Data
=
&
mountPathData
{
Device
:
filepath
.
Base
(
device
)}
ctx
.
Data
=
&
mountPathData
{
Device
:
filepath
.
Base
(
device
)}
mountPath
,
err
:=
interpolate
.
Render
(
config
.
MountPath
,
&
ctx
)
mountPath
,
err
:=
interpolate
.
Render
(
config
.
MountPath
,
&
ctx
)
...
...
builder/amazon/ebs/builder.go
View file @
84189f7a
...
@@ -29,7 +29,7 @@ type Config struct {
...
@@ -29,7 +29,7 @@ type Config struct {
awscommon
.
BlockDevices
`mapstructure:",squash"`
awscommon
.
BlockDevices
`mapstructure:",squash"`
awscommon
.
RunConfig
`mapstructure:",squash"`
awscommon
.
RunConfig
`mapstructure:",squash"`
ctx
*
interpolate
.
Context
ctx
interpolate
.
Context
}
}
type
Builder
struct
{
type
Builder
struct
{
...
@@ -38,10 +38,10 @@ type Builder struct {
...
@@ -38,10 +38,10 @@ type Builder struct {
}
}
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
b
.
config
.
ctx
=
&
interpolate
.
Context
{
Funcs
:
awscommon
.
TemplateFuncs
}
b
.
config
.
ctx
.
Funcs
=
awscommon
.
TemplateFuncs
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
b
.
config
.
ctx
,
InterpolateContext
:
&
b
.
config
.
ctx
,
},
raws
...
)
},
raws
...
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -49,10 +49,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
...
@@ -49,10 +49,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
// Accumulate any errors
// Accumulate any errors
var
errs
*
packer
.
MultiError
var
errs
*
packer
.
MultiError
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AccessConfig
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AccessConfig
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
BlockDevices
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
BlockDevices
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AMIConfig
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AMIConfig
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
RunConfig
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
RunConfig
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
if
errs
!=
nil
&&
len
(
errs
.
Errors
)
>
0
{
if
errs
!=
nil
&&
len
(
errs
.
Errors
)
>
0
{
return
nil
,
errs
return
nil
,
errs
...
...
builder/amazon/instance/builder.go
View file @
84189f7a
...
@@ -41,7 +41,7 @@ type Config struct {
...
@@ -41,7 +41,7 @@ type Config struct {
X509KeyPath
string
`mapstructure:"x509_key_path"`
X509KeyPath
string
`mapstructure:"x509_key_path"`
X509UploadPath
string
`mapstructure:"x509_upload_path"`
X509UploadPath
string
`mapstructure:"x509_upload_path"`
ctx
*
interpolate
.
Context
ctx
interpolate
.
Context
}
}
type
Builder
struct
{
type
Builder
struct
{
...
@@ -50,10 +50,10 @@ type Builder struct {
...
@@ -50,10 +50,10 @@ type Builder struct {
}
}
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
b
.
config
.
ctx
=
&
interpolate
.
Context
{
Funcs
:
awscommon
.
TemplateFuncs
}
b
.
config
.
ctx
.
Funcs
=
awscommon
.
TemplateFuncs
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
b
.
config
.
ctx
,
InterpolateContext
:
&
b
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"bundle_upload_command"
,
"bundle_upload_command"
,
...
@@ -114,10 +114,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
...
@@ -114,10 +114,10 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
// Accumulate any errors
// Accumulate any errors
var
errs
*
packer
.
MultiError
var
errs
*
packer
.
MultiError
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AccessConfig
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AccessConfig
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
BlockDevices
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
BlockDevices
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AMIConfig
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
AMIConfig
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
RunConfig
.
Prepare
(
b
.
config
.
ctx
)
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
b
.
config
.
RunConfig
.
Prepare
(
&
b
.
config
.
ctx
)
...
)
if
b
.
config
.
AccountId
==
""
{
if
b
.
config
.
AccountId
==
""
{
errs
=
packer
.
MultiErrorAppend
(
errs
,
errors
.
New
(
"account_id is required"
))
errs
=
packer
.
MultiErrorAppend
(
errs
,
errors
.
New
(
"account_id is required"
))
...
...
builder/amazon/instance/step_bundle_volume.go
View file @
84189f7a
...
@@ -42,7 +42,7 @@ func (s *StepBundleVolume) Run(state multistep.StateBag) multistep.StepAction {
...
@@ -42,7 +42,7 @@ func (s *StepBundleVolume) Run(state multistep.StateBag) multistep.StepAction {
Prefix
:
config
.
BundlePrefix
,
Prefix
:
config
.
BundlePrefix
,
PrivatePath
:
config
.
X509UploadPath
,
PrivatePath
:
config
.
X509UploadPath
,
}
}
config
.
BundleVolCommand
,
err
=
interpolate
.
Render
(
config
.
BundleVolCommand
,
config
.
ctx
)
config
.
BundleVolCommand
,
err
=
interpolate
.
Render
(
config
.
BundleVolCommand
,
&
config
.
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"Error processing bundle volume command: %s"
,
err
)
err
:=
fmt
.
Errorf
(
"Error processing bundle volume command: %s"
,
err
)
state
.
Put
(
"error"
,
err
)
state
.
Put
(
"error"
,
err
)
...
...
builder/amazon/instance/step_upload_bundle.go
View file @
84189f7a
...
@@ -44,7 +44,7 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction {
...
@@ -44,7 +44,7 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction {
Region
:
region
,
Region
:
region
,
SecretKey
:
config
.
SecretKey
,
SecretKey
:
config
.
SecretKey
,
}
}
config
.
BundleUploadCommand
,
err
=
interpolate
.
Render
(
config
.
BundleUploadCommand
,
config
.
ctx
)
config
.
BundleUploadCommand
,
err
=
interpolate
.
Render
(
config
.
BundleUploadCommand
,
&
config
.
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"Error processing bundle upload command: %s"
,
err
)
err
:=
fmt
.
Errorf
(
"Error processing bundle upload command: %s"
,
err
)
state
.
Put
(
"error"
,
err
)
state
.
Put
(
"error"
,
err
)
...
...
builder/digitalocean/config.go
View file @
84189f7a
...
@@ -31,7 +31,7 @@ type Config struct {
...
@@ -31,7 +31,7 @@ type Config struct {
DropletName
string
`mapstructure:"droplet_name"`
DropletName
string
`mapstructure:"droplet_name"`
UserData
string
`mapstructure:"user_data"`
UserData
string
`mapstructure:"user_data"`
ctx
*
interpolate
.
Context
ctx
interpolate
.
Context
}
}
func
NewConfig
(
raws
...
interface
{})
(
*
Config
,
[]
string
,
error
)
{
func
NewConfig
(
raws
...
interface
{})
(
*
Config
,
[]
string
,
error
)
{
...
@@ -41,6 +41,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
...
@@ -41,6 +41,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
Metadata
:
&
md
,
Metadata
:
&
md
,
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
c
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"run_command"
,
"run_command"
,
...
@@ -85,7 +86,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
...
@@ -85,7 +86,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
}
var
errs
*
packer
.
MultiError
var
errs
*
packer
.
MultiError
if
es
:=
c
.
Comm
.
Prepare
(
c
.
ctx
);
len
(
es
)
>
0
{
if
es
:=
c
.
Comm
.
Prepare
(
&
c
.
ctx
);
len
(
es
)
>
0
{
errs
=
packer
.
MultiErrorAppend
(
errs
,
es
...
)
errs
=
packer
.
MultiErrorAppend
(
errs
,
es
...
)
}
}
if
c
.
APIToken
==
""
{
if
c
.
APIToken
==
""
{
...
...
builder/docker/config.go
View file @
84189f7a
...
@@ -39,6 +39,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
...
@@ -39,6 +39,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
Metadata
:
&
md
,
Metadata
:
&
md
,
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
c
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"run_command"
,
"run_command"
,
...
...
builder/googlecompute/config.go
View file @
84189f7a
...
@@ -41,13 +41,14 @@ type Config struct {
...
@@ -41,13 +41,14 @@ type Config struct {
account
accountFile
account
accountFile
privateKeyBytes
[]
byte
privateKeyBytes
[]
byte
stateTimeout
time
.
Duration
stateTimeout
time
.
Duration
ctx
*
interpolate
.
Context
ctx
interpolate
.
Context
}
}
func
NewConfig
(
raws
...
interface
{})
(
*
Config
,
[]
string
,
error
)
{
func
NewConfig
(
raws
...
interface
{})
(
*
Config
,
[]
string
,
error
)
{
c
:=
new
(
Config
)
c
:=
new
(
Config
)
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
c
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"run_command"
,
"run_command"
,
...
...
builder/openstack/builder.go
View file @
84189f7a
...
@@ -36,6 +36,7 @@ type Builder struct {
...
@@ -36,6 +36,7 @@ type Builder struct {
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
b
.
config
.
ctx
,
},
raws
...
)
},
raws
...
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
builder/parallels/iso/builder.go
View file @
84189f7a
...
@@ -58,6 +58,7 @@ type Config struct {
...
@@ -58,6 +58,7 @@ type Config struct {
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
b
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"boot_command"
,
"boot_command"
,
...
...
builder/parallels/pvm/config.go
View file @
84189f7a
...
@@ -35,6 +35,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
...
@@ -35,6 +35,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
c
:=
new
(
Config
)
c
:=
new
(
Config
)
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
c
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"boot_command"
,
"boot_command"
,
...
...
builder/qemu/builder.go
View file @
84189f7a
...
@@ -128,6 +128,7 @@ type Config struct {
...
@@ -128,6 +128,7 @@ type Config struct {
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
b
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"boot_command"
,
"boot_command"
,
...
...
builder/virtualbox/ovf/config.go
View file @
84189f7a
...
@@ -43,6 +43,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
...
@@ -43,6 +43,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
c
:=
new
(
Config
)
c
:=
new
(
Config
)
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
c
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"boot_command"
,
"boot_command"
,
...
...
builder/vmware/iso/builder.go
View file @
84189f7a
...
@@ -69,6 +69,7 @@ type Config struct {
...
@@ -69,6 +69,7 @@ type Config struct {
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
([]
string
,
error
)
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
&
b
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
b
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"boot_command"
,
"boot_command"
,
...
...
builder/vmware/vmx/config.go
View file @
84189f7a
...
@@ -36,6 +36,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
...
@@ -36,6 +36,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
c
:=
new
(
Config
)
c
:=
new
(
Config
)
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
c
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
Exclude
:
[]
string
{
"boot_command"
,
"boot_command"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment