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
1a2e4f9d
Commit
1a2e4f9d
authored
Jul 05, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fmt
parent
a9f63871
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
builder/virtualbox/step_export.go
builder/virtualbox/step_export.go
+4
-4
post-processor/vagrant/aws.go
post-processor/vagrant/aws.go
+2
-0
post-processor/vagrant/util.go
post-processor/vagrant/util.go
+1
-1
provisioner/file/provisioner_test.go
provisioner/file/provisioner_test.go
+1
-1
No files found.
builder/virtualbox/step_export.go
View file @
1a2e4f9d
...
...
@@ -21,17 +21,17 @@ func (s *stepExport) Run(state map[string]interface{}) multistep.StepAction {
ui
:=
state
[
"ui"
]
.
(
packer
.
Ui
)
vmName
:=
state
[
"vmName"
]
.
(
string
)
// Clear out the Packer-created forwarding rule
// Clear out the Packer-created forwarding rule
ui
.
Say
(
fmt
.
Sprintf
(
"Deleting forwarded port mapping for SSH (host port %d)"
,
state
[
"sshHostPort"
]))
command
:=
[]
string
{
"modifyvm"
,
vmName
,
"--natpf1"
,
"delete"
,
"packerssh"
}
if
err
:=
driver
.
VBoxManage
(
command
...
);
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"Error deleting port forwarding rule: %s"
,
err
)
state
[
"error"
]
=
err
state
[
"error"
]
=
err
ui
.
Error
(
err
.
Error
())
return
multistep
.
ActionHalt
return
multistep
.
ActionHalt
}
// Export the VM to an OVF
// Export the VM to an OVF
outputPath
:=
filepath
.
Join
(
config
.
OutputDir
,
"packer.ovf"
)
command
=
[]
string
{
...
...
post-processor/vagrant/aws.go
View file @
1a2e4f9d
...
...
@@ -79,12 +79,14 @@ func (p *AWSBoxPostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact
log
.
Printf
(
"Using vagrantfile template: %s"
,
p
.
config
.
VagrantfileTemplate
)
f
,
err
:=
os
.
Open
(
p
.
config
.
VagrantfileTemplate
)
if
err
!=
nil
{
err
=
fmt
.
Errorf
(
"error opening vagrantfile template: %s"
,
err
)
return
nil
,
false
,
err
}
defer
f
.
Close
()
contents
,
err
:=
ioutil
.
ReadAll
(
f
)
if
err
!=
nil
{
err
=
fmt
.
Errorf
(
"error reading vagrantfile template: %s"
,
err
)
return
nil
,
false
,
err
}
...
...
post-processor/vagrant/util.go
View file @
1a2e4f9d
...
...
@@ -47,7 +47,7 @@ func DirToBox(dst, dir string) error {
// Skip directories
if
info
.
IsDir
()
{
log
.
Printf
(
"Skiping directory '%s' for box '%s'"
,
path
,
dst
)
log
.
Printf
(
"Skip
p
ing directory '%s' for box '%s'"
,
path
,
dst
)
return
nil
}
...
...
provisioner/file/provisioner_test.go
View file @
1a2e4f9d
...
...
@@ -114,7 +114,7 @@ func TestProvisionerProvision_SendsFile(t *testing.T) {
}
config
:=
map
[
string
]
interface
{}{
"source"
:
tf
.
Name
(),
"source"
:
tf
.
Name
(),
"destination"
:
"something"
,
}
...
...
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