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
f94500b3
Commit
f94500b3
authored
Jul 21, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/amazon/instance: boilerplate for bundle volume
parent
2674bdc9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
builder/amazon/instance/builder.go
builder/amazon/instance/builder.go
+1
-0
builder/amazon/instance/step_bundle_volume.go
builder/amazon/instance/step_bundle_volume.go
+15
-0
builder/amazon/instance/step_upload_x509_cert.go
builder/amazon/instance/step_upload_x509_cert.go
+2
-0
No files found.
builder/amazon/instance/builder.go
View file @
f94500b3
...
...
@@ -111,6 +111,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
},
&
common
.
StepProvision
{},
&
StepUploadX509Cert
{},
&
StepBundleVolume
{},
}
// Run!
...
...
builder/amazon/instance/step_bundle_volume.go
0 → 100644
View file @
f94500b3
package
instance
import
(
"github.com/mitchellh/multistep"
"time"
)
type
StepBundleVolume
struct
{}
func
(
s
*
StepBundleVolume
)
Run
(
state
map
[
string
]
interface
{})
multistep
.
StepAction
{
time
.
Sleep
(
10
*
time
.
Hour
)
return
multistep
.
ActionContinue
}
func
(
s
*
StepBundleVolume
)
Cleanup
(
map
[
string
]
interface
{})
{}
builder/amazon/instance/step_upload_x509_cert.go
View file @
f94500b3
...
...
@@ -20,11 +20,13 @@ func (s *StepUploadX509Cert) Run(state map[string]interface{}) multistep.StepAct
ui
.
Say
(
"Uploading X509 Certificate..."
)
if
err
:=
s
.
uploadSingle
(
comm
,
x509RemoteCertPath
,
config
.
X509CertPath
);
err
!=
nil
{
state
[
"error"
]
=
fmt
.
Errorf
(
"Error uploading X509 cert: %s"
,
err
)
ui
.
Error
(
state
[
"error"
]
.
(
error
)
.
Error
())
return
multistep
.
ActionHalt
}
if
err
:=
s
.
uploadSingle
(
comm
,
x509RemoteKeyPath
,
config
.
X509KeyPath
);
err
!=
nil
{
state
[
"error"
]
=
fmt
.
Errorf
(
"Error uploading X509 cert: %s"
,
err
)
ui
.
Error
(
state
[
"error"
]
.
(
error
)
.
Error
())
return
multistep
.
ActionHalt
}
...
...
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