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
2df25986
Commit
2df25986
authored
Jun 26, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-processor/vagrant: boilerplate
parent
8bfa90a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
0 deletions
+67
-0
plugin/post-processor-vagrant/main.go
plugin/post-processor-vagrant/main.go
+10
-0
post-processor/vagrant/aws.go
post-processor/vagrant/aws.go
+16
-0
post-processor/vagrant/aws_test.go
post-processor/vagrant/aws_test.go
+15
-0
post-processor/vagrant/post-processor.go
post-processor/vagrant/post-processor.go
+26
-0
No files found.
plugin/post-processor-vagrant/main.go
0 → 100644
View file @
2df25986
package
main
import
(
"github.com/mitchellh/packer/packer/plugin"
"github.com/mitchellh/packer/post-processor/vagrant"
)
func
main
()
{
plugin
.
ServePostProcessor
(
new
(
vagrant
.
PostProcessor
))
}
post-processor/vagrant/aws.go
0 → 100644
View file @
2df25986
package
vagrant
import
(
"github.com/mitchellh/packer/packer"
)
type
AWSBoxPostProcessor
struct
{
}
func
(
p
*
AWSBoxPostProcessor
)
Configure
(
raw
interface
{})
error
{
return
nil
}
func
(
p
*
AWSBoxPostProcessor
)
PostProcess
(
ui
packer
.
Ui
,
artifact
packer
.
Artifact
)
(
packer
.
Artifact
,
error
)
{
return
nil
,
nil
}
post-processor/vagrant/aws_test.go
0 → 100644
View file @
2df25986
package
vagrant
import
(
"github.com/mitchellh/packer/packer"
"testing"
)
func
TestPostProcessor_ImplementsPostProcessor
(
t
*
testing
.
T
)
{
var
raw
interface
{}
raw
=
&
AWSBoxPostProcessor
{}
if
_
,
ok
:=
raw
.
(
packer
.
PostProcessor
);
!
ok
{
t
.
Fatalf
(
"AWS PostProcessor should be a PostProcessor"
)
}
}
post-processor/vagrant/post-processor.go
0 → 100644
View file @
2df25986
// vagrant implements the packer.PostProcessor interface and adds a
// post-processor that turns artifacts of known builders into Vagrant
// boxes.
package
vagrant
import
(
"github.com/mitchellh/packer/packer"
)
var
builtins
=
map
[
string
]
string
{
"mitchellh.amazonebs"
:
"aws"
,
}
type
Config
struct
{}
type
PostProcessor
struct
{
config
Config
}
func
(
p
*
PostProcessor
)
Configure
(
raw
interface
{})
error
{
return
nil
}
func
(
p
*
PostProcessor
)
PostProcess
(
ui
packer
.
Ui
,
artifact
packer
.
Artifact
)
(
packer
.
Artifact
,
error
)
{
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