Commit d6efe3c7 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/amazonebs, plugin/builder-amazon-ebs

parent c164b4c2
...@@ -10,6 +10,8 @@ all: ...@@ -10,6 +10,8 @@ all:
go get -d -v ./... go get -d -v ./...
@echo "$(OK_COLOR)--> Compiling Packer...$(NO_COLOR)" @echo "$(OK_COLOR)--> Compiling Packer...$(NO_COLOR)"
go build -v -o bin/packer go build -v -o bin/packer
@echo "$(OK_COLOR)--> Compiling Builder: Amazon EBS...$(NO_COLOR)"
$(MAKE) -C plugin/builder-amazon-ebs
@echo "$(OK_COLOR)--> Compiling Command: Build...$(NO_COLOR)" @echo "$(OK_COLOR)--> Compiling Command: Build...$(NO_COLOR)"
$(MAKE) -C plugin/command-build $(MAKE) -C plugin/command-build
......
package amazon package amazonebs
import (
"github.com/mitchellh/packer/packer"
)
type config struct { type config struct {
AccessKey string AccessKey string
...@@ -11,12 +15,6 @@ type Builder struct { ...@@ -11,12 +15,6 @@ type Builder struct {
config config config config
} }
func (b *Builder) ConfigInterface() interface{} { func (*Builder) Prepare(interface{}) {}
return &b.config
}
func (*Builder) Prepare() { func (*Builder) Run(packer.Build, packer.Ui) {}
}
func (b *Builder) Build() {
}
package amazonebs
import (
"cgl.tideland.biz/asserts"
"github.com/mitchellh/packer/packer"
"testing"
)
func TestBuilder_ImplementsBuilder(t *testing.T) {
assert := asserts.NewTestingAsserts(t, true)
var actual packer.Builder
assert.Implementor(&Builder{}, &actual, "should be a Builder")
}
PLUGIN_NAME=packer-builder-amazon-ebs
plugin:
go get -d -v ./...
go build -v -o $(ROOTDIR)/bin/$(PLUGIN_NAME)
format:
go fmt ./...
test:
@go list -f '{{range .TestImports}}{{.}}\
{{end}}' ./... | xargs -n1 go get -d
go test ./...
.PHONY: all format test
package main
import (
"github.com/mitchellh/packer/builder/amazonebs"
"github.com/mitchellh/packer/packer/plugin"
)
func main() {
plugin.ServeBuilder(new(amazonebs.Builder))
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment