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
15f215d0
Commit
15f215d0
authored
May 20, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go fmt
parent
2efab467
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
38 deletions
+45
-38
builder/amazonebs/builder.go
builder/amazonebs/builder.go
+10
-3
command/build/command.go
command/build/command.go
+1
-1
communicator/ssh/communicator_test.go
communicator/ssh/communicator_test.go
+1
-1
packer/communicator.go
packer/communicator.go
+4
-4
packer/environment.go
packer/environment.go
+6
-6
packer/hook_test.go
packer/hook_test.go
+4
-4
packer/plugin/hook.go
packer/plugin/hook.go
+2
-2
packer/rpc/communicator.go
packer/rpc/communicator.go
+5
-5
packer/rpc/communicator_test.go
packer/rpc/communicator_test.go
+8
-8
packer/rpc/hook.go
packer/rpc/hook.go
+2
-2
packer/rpc/hook_test.go
packer/rpc/hook_test.go
+2
-2
No files found.
builder/amazonebs/builder.go
View file @
15f215d0
...
...
@@ -16,11 +16,18 @@ import (
)
type
config
struct
{
// Access information
AccessKey
string
`mapstructure:"access_key"`
AMIName
string
`mapstructure:"ami_name"`
Region
string
SecretKey
string
`mapstructure:"secret_key"`
SourceAmi
string
`mapstructure:"source_ami"`
// Information for the source AMI
Region
string
SourceAmi
string
`mapstructure:"source_ami"`
SSHUsername
string
`mapstructure:"ssh_username"`
SSHKeyPath
string
`mapstructure:"ssh_private_key_path"`
// Configuration of the resulting AMI
AMIName
string
`mapstructure:"ami_name"`
}
type
Builder
struct
{
...
...
command/build/command.go
View file @
15f215d0
...
...
@@ -34,7 +34,7 @@ func (Command) Run(env packer.Environment, args []string) int {
// The component finder for our builds
components
:=
&
packer
.
ComponentFinder
{
Builder
:
env
.
Builder
,
Hook
:
env
.
Hook
,
Hook
:
env
.
Hook
,
}
// Go through each builder and compile the builds that we care about
...
...
communicator/ssh/communicator_test.go
View file @
15f215d0
...
...
@@ -3,8 +3,8 @@ package ssh
import
(
"bytes"
"code.google.com/p/go.crypto/ssh"
"github.com/mitchellh/packer/packer"
"fmt"
"github.com/mitchellh/packer/packer"
"net"
"strings"
"testing"
...
...
packer/communicator.go
View file @
15f215d0
...
...
@@ -29,10 +29,10 @@ type Communicator interface {
// ExitStatus is the exit code of the remote process. It is only available
// once Wait is called.
type
RemoteCommand
struct
{
Stdin
io
.
Writer
Stdout
io
.
Reader
Stderr
io
.
Reader
Exited
bool
Stdin
io
.
Writer
Stdout
io
.
Reader
Stderr
io
.
Reader
Exited
bool
ExitStatus
int
}
...
...
packer/environment.go
View file @
15f215d0
...
...
@@ -43,16 +43,16 @@ type Environment interface {
// An implementation of an Environment that represents the Packer core
// environment.
type
coreEnvironment
struct
{
commands
[]
string
components
ComponentFinder
ui
Ui
commands
[]
string
components
ComponentFinder
ui
Ui
}
// This struct configures new environments.
type
EnvironmentConfig
struct
{
Commands
[]
string
Components
ComponentFinder
Ui
Ui
Commands
[]
string
Components
ComponentFinder
Ui
Ui
}
// DefaultEnvironmentConfig returns a default EnvironmentConfig that can
...
...
packer/hook_test.go
View file @
15f215d0
...
...
@@ -7,10 +7,10 @@ import (
type
TestHook
struct
{
runCalled
bool
runComm
Communicator
runData
interface
{}
runName
string
runUi
Ui
runComm
Communicator
runData
interface
{}
runName
string
runUi
Ui
}
func
(
t
*
TestHook
)
Run
(
name
string
,
ui
Ui
,
comm
Communicator
,
data
interface
{})
{
...
...
packer/plugin/hook.go
View file @
15f215d0
...
...
@@ -9,8 +9,8 @@ import (
)
type
cmdHook
struct
{
hook
packer
.
Hook
client
*
client
hook
packer
.
Hook
client
*
client
}
func
(
c
*
cmdHook
)
Run
(
name
string
,
ui
packer
.
Ui
,
comm
packer
.
Communicator
,
data
interface
{})
{
...
...
packer/rpc/communicator.go
View file @
15f215d0
...
...
@@ -28,19 +28,19 @@ type RemoteCommandServer struct {
}
type
CommunicatorStartResponse
struct
{
StdinAddress
string
StdoutAddress
string
StderrAddress
string
StdinAddress
string
StdoutAddress
string
StderrAddress
string
RemoteCommandAddress
string
}
type
CommunicatorDownloadArgs
struct
{
Path
string
Path
string
WriterAddress
string
}
type
CommunicatorUploadArgs
struct
{
Path
string
Path
string
ReaderAddress
string
}
...
...
packer/rpc/communicator_test.go
View file @
15f215d0
...
...
@@ -11,20 +11,20 @@ import (
type
testCommunicator
struct
{
startCalled
bool
startCmd
string
startCmd
string
startIn
*
io
.
PipeReader
startOut
*
io
.
PipeWriter
startErr
*
io
.
PipeWriter
startExited
*
bool
startIn
*
io
.
PipeReader
startOut
*
io
.
PipeWriter
startErr
*
io
.
PipeWriter
startExited
*
bool
startExitStatus
*
int
uploadCalled
bool
uploadPath
string
uploadData
string
uploadPath
string
uploadData
string
downloadCalled
bool
downloadPath
string
downloadPath
string
}
func
(
t
*
testCommunicator
)
Start
(
cmd
string
)
(
*
packer
.
RemoteCommand
,
error
)
{
...
...
packer/rpc/hook.go
View file @
15f215d0
...
...
@@ -18,8 +18,8 @@ type HookServer struct {
}
type
HookRunArgs
struct
{
Name
string
Data
interface
{}
Name
string
Data
interface
{}
RPCAddress
string
}
...
...
packer/rpc/hook_test.go
View file @
15f215d0
...
...
@@ -8,8 +8,8 @@ import (
)
type
testHook
struct
{
runCalled
bool
runUi
packer
.
Ui
runCalled
bool
runUi
packer
.
Ui
}
func
(
h
*
testHook
)
Run
(
name
string
,
ui
packer
.
Ui
,
comm
packer
.
Communicator
,
data
interface
{})
{
...
...
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