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
0880d448
Commit
0880d448
authored
Jun 18, 2015
by
Chris Bednarski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup some debug code and reorganize config struct
parent
f06847ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
post-processor/compress/post-processor.go
post-processor/compress/post-processor.go
+11
-10
No files found.
post-processor/compress/post-processor.go
View file @
0880d448
...
@@ -21,12 +21,16 @@ import (
...
@@ -21,12 +21,16 @@ import (
type
Config
struct
{
type
Config
struct
{
common
.
PackerConfig
`mapstructure:",squash"`
common
.
PackerConfig
`mapstructure:",squash"`
// Fields from config file
OutputPath
string
`mapstructure:"output"`
OutputPath
string
`mapstructure:"output"`
CompressionLevel
int
`mapstructure:"compression_level"`
CompressionLevel
int
`mapstructure:"compression_level"`
KeepInputArtifact
bool
`mapstructure:"keep_input_artifact"`
KeepInputArtifact
bool
`mapstructure:"keep_input_artifact"`
// Derived fields
Archive
string
Archive
string
Algorithm
string
Algorithm
string
UsingDefault
bool
ctx
*
interpolate
.
Context
ctx
*
interpolate
.
Context
}
}
...
@@ -54,8 +58,6 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
...
@@ -54,8 +58,6 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
},
},
},
raws
...
)
},
raws
...
)
fmt
.
Printf
(
"CompressionLevel: %d
\n
"
,
p
.
config
.
CompressionLevel
)
errs
:=
new
(
packer
.
MultiError
)
errs
:=
new
(
packer
.
MultiError
)
if
p
.
config
.
OutputPath
==
""
{
if
p
.
config
.
OutputPath
==
""
{
...
@@ -81,7 +83,6 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
...
@@ -81,7 +83,6 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
p
.
config
.
CompressionLevel
=
pgzip
.
DefaultCompression
p
.
config
.
CompressionLevel
=
pgzip
.
DefaultCompression
}
}
fmt
.
Printf
(
"CompressionLevel: %d
\n
"
,
p
.
config
.
CompressionLevel
)
for
key
,
ptr
:=
range
templates
{
for
key
,
ptr
:=
range
templates
{
if
*
ptr
==
""
{
if
*
ptr
==
""
{
errs
=
packer
.
MultiErrorAppend
(
errs
=
packer
.
MultiErrorAppend
(
...
...
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