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
f754c171
Commit
f754c171
authored
Jun 15, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/*: Add support for debug
parent
22e73451
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
builder/amazonebs/builder.go
builder/amazonebs/builder.go
+11
-1
builder/virtualbox/builder.go
builder/virtualbox/builder.go
+12
-1
No files found.
builder/amazonebs/builder.go
View file @
f754c171
...
...
@@ -12,6 +12,7 @@ import (
"github.com/mitchellh/goamz/ec2"
"github.com/mitchellh/mapstructure"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/builder/common"
"github.com/mitchellh/packer/packer"
"log"
"time"
...
...
@@ -36,6 +37,7 @@ type config struct {
// Configuration of the resulting AMI
AMIName
string
`mapstructure:"ami_name"`
PackerDebug
bool
`mapstructure:"packer_debug"`
RawSSHTimeout
string
`mapstructure:"ssh_timeout"`
}
...
...
@@ -132,7 +134,15 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
}
// Run!
if
b
.
config
.
PackerDebug
{
b
.
runner
=
&
multistep
.
DebugRunner
{
Steps
:
steps
,
PauseFn
:
common
.
MultistepDebugFn
(
ui
),
}
}
else
{
b
.
runner
=
&
multistep
.
BasicRunner
{
Steps
:
steps
}
}
b
.
runner
.
Run
(
state
)
// If there are no AMIs, then jsut return
...
...
builder/virtualbox/builder.go
View file @
f754c171
...
...
@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/mitchellh/mapstructure"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/builder/common"
"github.com/mitchellh/packer/packer"
"log"
"net/url"
...
...
@@ -42,6 +43,8 @@ type config struct {
SSHWaitTimeout
time
.
Duration
``
VMName
string
`mapstructure:"vm_name"`
PackerDebug
bool
`mapstructure:"packer_debug"`
RawBootWait
string
`mapstructure:"boot_wait"`
RawShutdownTimeout
string
`mapstructure:"shutdown_timeout"`
RawSSHWaitTimeout
string
`mapstructure:"ssh_wait_timeout"`
...
...
@@ -212,7 +215,15 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state
[
"ui"
]
=
ui
// Run
if
b
.
config
.
PackerDebug
{
b
.
runner
=
&
multistep
.
DebugRunner
{
Steps
:
steps
,
PauseFn
:
common
.
MultistepDebugFn
(
ui
),
}
}
else
{
b
.
runner
=
&
multistep
.
BasicRunner
{
Steps
:
steps
}
}
b
.
runner
.
Run
(
state
)
return
nil
,
nil
...
...
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