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
28bf6122
Commit
28bf6122
authored
Aug 30, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provisioner/*: implement Cancel
parent
47cd6df8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
provisioner/chef-solo/provisioner.go
provisioner/chef-solo/provisioner.go
+6
-0
provisioner/file/provisioner.go
provisioner/file/provisioner.go
+6
-0
provisioner/salt-masterless/provisioner.go
provisioner/salt-masterless/provisioner.go
+6
-0
provisioner/shell/provisioner.go
provisioner/shell/provisioner.go
+6
-0
No files found.
provisioner/chef-solo/provisioner.go
View file @
28bf6122
...
...
@@ -183,6 +183,12 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
return
nil
}
func
(
p
*
Provisioner
)
Cancel
()
{
// Just hard quit. It isn't a big deal if what we're doing keeps
// running on the other side.
os
.
Exit
(
0
)
}
func
(
p
*
Provisioner
)
uploadDirectory
(
ui
packer
.
Ui
,
comm
packer
.
Communicator
,
dst
string
,
src
string
)
error
{
if
err
:=
p
.
createDir
(
ui
,
comm
,
dst
);
err
!=
nil
{
return
err
...
...
provisioner/file/provisioner.go
View file @
28bf6122
...
...
@@ -84,3 +84,9 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
}
return
err
}
func
(
p
*
Provisioner
)
Cancel
()
{
// Just hard quit. It isn't a big deal if what we're doing keeps
// running on the other side.
os
.
Exit
(
0
)
}
provisioner/salt-masterless/provisioner.go
View file @
28bf6122
...
...
@@ -200,6 +200,12 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
return
nil
}
func
(
p
*
Provisioner
)
Cancel
()
{
// Just hard quit. It isn't a big deal if what we're doing keeps
// running on the other side.
os
.
Exit
(
0
)
}
func
UploadLocalDirectory
(
localDir
string
,
remoteDir
string
,
comm
packer
.
Communicator
,
ui
packer
.
Ui
)
(
err
error
)
{
visitPath
:=
func
(
localPath
string
,
f
os
.
FileInfo
,
err
error
)
(
err2
error
)
{
localRelPath
:=
strings
.
Replace
(
localPath
,
localDir
,
""
,
1
)
...
...
provisioner/shell/provisioner.go
View file @
28bf6122
...
...
@@ -281,6 +281,12 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
return
nil
}
func
(
p
*
Provisioner
)
Cancel
()
{
// Just hard quit. It isn't a big deal if what we're doing keeps
// running on the other side.
os
.
Exit
(
0
)
}
// retryable will retry the given function over and over until a
// non-error is returned.
func
(
p
*
Provisioner
)
retryable
(
f
func
()
error
)
error
{
...
...
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