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
faf6eb1c
Commit
faf6eb1c
authored
Aug 19, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-processor/vagrant: show file being compressed [GH-314]
parent
1be6563e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
4 deletions
+13
-4
CHANGELOG.md
CHANGELOG.md
+3
-0
post-processor/vagrant/aws.go
post-processor/vagrant/aws.go
+1
-1
post-processor/vagrant/util.go
post-processor/vagrant/util.go
+7
-1
post-processor/vagrant/virtualbox.go
post-processor/vagrant/virtualbox.go
+1
-1
post-processor/vagrant/vmware.go
post-processor/vagrant/vmware.go
+1
-1
No files found.
CHANGELOG.md
View file @
faf6eb1c
## 0.3.4 (unreleased)
IMPROVEMENTS:
*
post-processor/vagrant: the file being compressed will be shown
in the UI [GH-314]
## 0.3.3 (August 19, 2013)
...
...
post-processor/vagrant/aws.go
View file @
faf6eb1c
...
...
@@ -134,7 +134,7 @@ func (p *AWSBoxPostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact
}
// Compress the directory to the given output path
if
err
:=
DirToBox
(
outputPath
,
dir
);
err
!=
nil
{
if
err
:=
DirToBox
(
outputPath
,
dir
,
ui
);
err
!=
nil
{
err
=
fmt
.
Errorf
(
"error creating box: %s"
,
err
)
return
nil
,
false
,
err
}
...
...
post-processor/vagrant/util.go
View file @
faf6eb1c
...
...
@@ -4,6 +4,8 @@ import (
"archive/tar"
"compress/gzip"
"encoding/json"
"fmt"
"github.com/mitchellh/packer/packer"
"io"
"log"
"os"
...
...
@@ -42,7 +44,7 @@ func CopyContents(dst, src string) error {
// DirToBox takes the directory and compresses it into a Vagrant-compatible
// box. This function does not perform checks to verify that dir is
// actually a proper box. This is an expected precondition.
func
DirToBox
(
dst
,
dir
string
)
error
{
func
DirToBox
(
dst
,
dir
string
,
ui
packer
.
Ui
)
error
{
log
.
Printf
(
"Turning dir into box: %s => %s"
,
dir
,
dst
)
dstF
,
err
:=
os
.
Create
(
dst
)
if
err
!=
nil
{
...
...
@@ -90,6 +92,10 @@ func DirToBox(dst, dir string) error {
return
err
}
if
ui
!=
nil
{
ui
.
Message
(
fmt
.
Sprintf
(
"Compressing: %s"
,
header
.
Name
))
}
if
err
:=
tarWriter
.
WriteHeader
(
header
);
err
!=
nil
{
return
err
}
...
...
post-processor/vagrant/virtualbox.go
View file @
faf6eb1c
...
...
@@ -143,7 +143,7 @@ func (p *VBoxBoxPostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifac
// Compress the directory to the given output path
ui
.
Message
(
fmt
.
Sprintf
(
"Compressing box..."
))
if
err
:=
DirToBox
(
outputPath
,
dir
);
err
!=
nil
{
if
err
:=
DirToBox
(
outputPath
,
dir
,
ui
);
err
!=
nil
{
return
nil
,
false
,
err
}
...
...
post-processor/vagrant/vmware.go
View file @
faf6eb1c
...
...
@@ -119,7 +119,7 @@ func (p *VMwareBoxPostProcessor) PostProcess(ui packer.Ui, artifact packer.Artif
// Compress the directory to the given output path
ui
.
Message
(
fmt
.
Sprintf
(
"Compressing box..."
))
if
err
:=
DirToBox
(
outputPath
,
dir
);
err
!=
nil
{
if
err
:=
DirToBox
(
outputPath
,
dir
,
ui
);
err
!=
nil
{
return
nil
,
false
,
err
}
...
...
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