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
368ccab8
Commit
368ccab8
authored
May 10, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer: Put Builder definition into its own file
parent
208daf7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
packer/build.go
packer/build.go
+0
-14
packer/builder.go
packer/builder.go
+16
-0
No files found.
packer/build.go
View file @
368ccab8
...
@@ -22,20 +22,6 @@ type coreBuild struct {
...
@@ -22,20 +22,6 @@ type coreBuild struct {
prepareCalled
bool
prepareCalled
bool
}
}
// Implementers of Builder are responsible for actually building images
// on some platform given some configuration.
//
// Prepare is responsible for reading in some configuration, in the raw form
// of map[string]interface{}, and storing that state for use later. Any setup
// should be done in this method. Note that NO side effects should really take
// place in prepare. It is meant as a state setup step only.
//
// Run is where the actual build should take place. It takes a Build and a Ui.
type
Builder
interface
{
Prepare
(
config
interface
{})
error
Run
(
build
Build
,
ui
Ui
)
}
// Returns the name of the build.
// Returns the name of the build.
func
(
b
*
coreBuild
)
Name
()
string
{
func
(
b
*
coreBuild
)
Name
()
string
{
return
b
.
name
return
b
.
name
...
...
packer/builder.go
0 → 100644
View file @
368ccab8
package
packer
// Implementers of Builder are responsible for actually building images
// on some platform given some configuration.
//
// Prepare is responsible for reading in some configuration, in the raw form
// of map[string]interface{}, and storing that state for use later. Any setup
// should be done in this method. Note that NO side effects should really take
// place in prepare. It is meant as a state setup step only.
//
// Run is where the actual build should take place. It takes a Build and a Ui.
type
Builder
interface
{
Prepare
(
config
interface
{})
error
Run
(
build
Build
,
ui
Ui
)
}
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