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
12cf6650
Commit
12cf6650
authored
Jun 16, 2015
by
Chris Bednarski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert compress post-processor to master to get baseline test
parent
f2f8ad16
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
373 deletions
+60
-373
post-processor/compress/artifact.go
post-processor/compress/artifact.go
+18
-12
post-processor/compress/post-processor.go
post-processor/compress/post-processor.go
+42
-361
No files found.
post-processor/compress/artifact.go
View file @
12cf6650
...
...
@@ -8,31 +8,37 @@ import (
const
BuilderId
=
"packer.post-processor.compress"
type
Artifact
struct
{
builderId
string
dir
string
f
[]
string
Path
string
Provider
string
}
func
(
a
*
Artifact
)
BuilderId
()
string
{
func
NewArtifact
(
provider
,
path
string
)
*
Artifact
{
return
&
Artifact
{
Path
:
path
,
Provider
:
provider
,
}
}
func
(
*
Artifact
)
BuilderId
()
string
{
return
BuilderId
}
func
(
a
*
Artifact
)
Files
()
[]
string
{
return
a
.
f
func
(
self
*
Artifact
)
Id
()
string
{
return
""
}
func
(
*
Artifact
)
Id
()
string
{
return
"COMPRESS"
func
(
self
*
Artifact
)
Files
()
[]
string
{
return
[]
string
{
self
.
Path
}
}
func
(
a
*
Artifact
)
String
()
string
{
return
fmt
.
Sprintf
(
"
VM compressed files in directory: %s"
,
a
.
dir
)
func
(
self
*
Artifact
)
String
()
string
{
return
fmt
.
Sprintf
(
"
'%s' compressing: %s"
,
self
.
Provider
,
self
.
Path
)
}
func
(
*
Artifact
)
State
(
name
string
)
interface
{}
{
return
nil
}
func
(
a
*
Artifact
)
Destroy
()
error
{
return
os
.
Remove
All
(
a
.
dir
)
func
(
self
*
Artifact
)
Destroy
()
error
{
return
os
.
Remove
(
self
.
Path
)
}
post-processor/compress/post-processor.go
View file @
12cf6650
This diff is collapsed.
Click to expand it.
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