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
5241d8c6
Commit
5241d8c6
authored
Jun 22, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-processor/*: fix interpolation context
parent
4dc4fa81
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
13 deletions
+22
-13
post-processor/atlas/post-processor.go
post-processor/atlas/post-processor.go
+2
-1
post-processor/compress/post-processor.go
post-processor/compress/post-processor.go
+5
-4
post-processor/docker-import/post-processor.go
post-processor/docker-import/post-processor.go
+2
-1
post-processor/docker-push/post-processor.go
post-processor/docker-push/post-processor.go
+2
-1
post-processor/docker-save/post-processor.go
post-processor/docker-save/post-processor.go
+2
-1
post-processor/docker-tag/post-processor.go
post-processor/docker-tag/post-processor.go
+2
-1
post-processor/vagrant-cloud/post-processor.go
post-processor/vagrant-cloud/post-processor.go
+2
-1
post-processor/vagrant/post-processor.go
post-processor/vagrant/post-processor.go
+3
-2
post-processor/vsphere/post-processor.go
post-processor/vsphere/post-processor.go
+2
-1
No files found.
post-processor/atlas/post-processor.go
View file @
5241d8c6
...
...
@@ -53,7 +53,8 @@ type PostProcessor struct {
func
(
p
*
PostProcessor
)
Configure
(
raws
...
interface
{})
error
{
err
:=
config
.
Decode
(
&
p
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
p
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{},
},
...
...
post-processor/compress/post-processor.go
View file @
5241d8c6
...
...
@@ -31,7 +31,7 @@ type Config struct {
Archive
string
Algorithm
string
ctx
*
interpolate
.
Context
ctx
interpolate
.
Context
}
type
PostProcessor
struct
{
...
...
@@ -52,7 +52,8 @@ var (
func
(
p
*
PostProcessor
)
Configure
(
raws
...
interface
{})
error
{
err
:=
config
.
Decode
(
&
p
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
p
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{},
},
...
...
@@ -69,7 +70,7 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
p
.
config
.
OutputPath
=
"packer_{{.BuildName}}_{{.Provider}}"
}
if
err
=
interpolate
.
Validate
(
p
.
config
.
OutputPath
,
p
.
config
.
ctx
);
err
!=
nil
{
if
err
=
interpolate
.
Validate
(
p
.
config
.
OutputPath
,
&
p
.
config
.
ctx
);
err
!=
nil
{
errs
=
packer
.
MultiErrorAppend
(
errs
,
fmt
.
Errorf
(
"Error parsing target template: %s"
,
err
))
}
...
...
@@ -94,7 +95,7 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
errs
,
fmt
.
Errorf
(
"%s must be set"
,
key
))
}
*
ptr
,
err
=
interpolate
.
Render
(
p
.
config
.
OutputPath
,
p
.
config
.
ctx
)
*
ptr
,
err
=
interpolate
.
Render
(
p
.
config
.
OutputPath
,
&
p
.
config
.
ctx
)
if
err
!=
nil
{
errs
=
packer
.
MultiErrorAppend
(
errs
,
fmt
.
Errorf
(
"Error processing %s: %s"
,
key
,
err
))
...
...
post-processor/docker-import/post-processor.go
View file @
5241d8c6
...
...
@@ -27,7 +27,8 @@ type PostProcessor struct {
func
(
p
*
PostProcessor
)
Configure
(
raws
...
interface
{})
error
{
err
:=
config
.
Decode
(
&
p
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
p
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{},
},
...
...
post-processor/docker-push/post-processor.go
View file @
5241d8c6
...
...
@@ -33,7 +33,8 @@ type PostProcessor struct {
func
(
p
*
PostProcessor
)
Configure
(
raws
...
interface
{})
error
{
err
:=
config
.
Decode
(
&
p
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
p
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{},
},
...
...
post-processor/docker-save/post-processor.go
View file @
5241d8c6
...
...
@@ -31,7 +31,8 @@ type PostProcessor struct {
func
(
p
*
PostProcessor
)
Configure
(
raws
...
interface
{})
error
{
err
:=
config
.
Decode
(
&
p
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
p
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{},
},
...
...
post-processor/docker-tag/post-processor.go
View file @
5241d8c6
...
...
@@ -31,7 +31,8 @@ type PostProcessor struct {
func
(
p
*
PostProcessor
)
Configure
(
raws
...
interface
{})
error
{
err
:=
config
.
Decode
(
&
p
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
p
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{},
},
...
...
post-processor/vagrant-cloud/post-processor.go
View file @
5241d8c6
...
...
@@ -47,7 +47,8 @@ type PostProcessor struct {
func
(
p
*
PostProcessor
)
Configure
(
raws
...
interface
{})
error
{
err
:=
config
.
Decode
(
&
p
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
p
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
"box_download_url"
,
...
...
post-processor/vagrant/post-processor.go
View file @
5241d8c6
...
...
@@ -170,8 +170,9 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
func
(
p
*
PostProcessor
)
configureSingle
(
c
*
Config
,
raws
...
interface
{})
error
{
var
md
mapstructure
.
Metadata
err
:=
config
.
Decode
(
c
,
&
config
.
DecodeOpts
{
Metadata
:
&
md
,
Interpolate
:
true
,
Metadata
:
&
md
,
Interpolate
:
true
,
InterpolateContext
:
&
c
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{
"output"
,
...
...
post-processor/vsphere/post-processor.go
View file @
5241d8c6
...
...
@@ -43,7 +43,8 @@ type PostProcessor struct {
func
(
p
*
PostProcessor
)
Configure
(
raws
...
interface
{})
error
{
err
:=
config
.
Decode
(
&
p
.
config
,
&
config
.
DecodeOpts
{
Interpolate
:
true
,
Interpolate
:
true
,
InterpolateContext
:
&
p
.
config
.
ctx
,
InterpolateFilter
:
&
interpolate
.
RenderFilter
{
Exclude
:
[]
string
{},
},
...
...
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