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
04563764
Commit
04563764
authored
May 07, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`packer build` now communicates through RPC!
parent
91ade277
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
1 deletion
+15
-1
Makefile
Makefile
+2
-0
packer.go
packer.go
+6
-0
packer/plugin/command.go
packer/plugin/command.go
+6
-0
plugin/command-build/Makefile
plugin/command-build/Makefile
+1
-1
plugin/command-build/bin/packer-build
plugin/command-build/bin/packer-build
+0
-0
No files found.
Makefile
View file @
04563764
...
...
@@ -3,6 +3,8 @@ OK_COLOR=\x1b[32;01m
ERROR_COLOR
=
\x
1b[31
;
01m
WARN_COLOR
=
\x
1b[33
;
01m
export
ROOTDIR
=
$(CURDIR)
all
:
@
mkdir
-p
bin/
go get
-d
-v
./...
...
...
packer.go
View file @
04563764
...
...
@@ -3,12 +3,18 @@ package main
import
(
"github.com/mitchellh/packer/packer"
"github.com/mitchellh/packer/packer/plugin"
"fmt"
"os"
"os/exec"
)
func
main
()
{
envConfig
:=
packer
.
DefaultEnvironmentConfig
()
envConfig
.
Commands
=
[]
string
{
"build"
}
envConfig
.
CommandFunc
=
func
(
n
string
)
packer
.
Command
{
return
plugin
.
Command
(
exec
.
Command
(
"bin/packer-build"
))
}
env
,
err
:=
packer
.
NewEnvironment
(
envConfig
)
if
err
!=
nil
{
...
...
packer/plugin/command.go
View file @
04563764
...
...
@@ -11,7 +11,13 @@ import (
)
func
Command
(
cmd
*
exec
.
Cmd
)
packer
.
Command
{
env
:=
[]
string
{
"PACKER_PLUGIN_MIN_PORT=10000"
,
"PACKER_PLUGIN_MAX_PORT=25000"
,
}
out
:=
new
(
bytes
.
Buffer
)
cmd
.
Env
=
append
(
cmd
.
Env
,
env
...
)
cmd
.
Stdout
=
out
cmd
.
Start
()
...
...
plugin/command-build/Makefile
View file @
04563764
plugin
:
go get
-d
-v
./...
go build
-v
-o
$(
CUR
DIR)
/bin/packer-build
go build
-v
-o
$(
ROOT
DIR)
/bin/packer-build
format
:
go
fmt
./...
...
...
plugin/command-build/bin/packer-build
deleted
100755 → 0
View file @
91ade277
File deleted
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