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
b5f153a1
Commit
b5f153a1
authored
Mar 12, 2014
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command/build: -parallel=false to disable parallelization [GH-924]
parent
6fe0cb76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
CHANGELOG.md
CHANGELOG.md
+2
-0
command/build/command.go
command/build/command.go
+7
-0
command/build/help.go
command/build/help.go
+1
-0
No files found.
CHANGELOG.md
View file @
b5f153a1
...
...
@@ -10,6 +10,8 @@ FEATURES:
IMPROVEMENTS:
*
builder/vmware: Workstation 10 support for Linux. [GH-900]
*
command/build: Added '-parallel' flag so you can disable parallelization
with
`-no-parallel`
. [GH-924]
BUG FIXES:
...
...
command/build/command.go
View file @
b5f153a1
...
...
@@ -23,12 +23,14 @@ func (Command) Help() string {
func
(
c
Command
)
Run
(
env
packer
.
Environment
,
args
[]
string
)
int
{
var
cfgDebug
bool
var
cfgForce
bool
var
cfgParallel
bool
buildOptions
:=
new
(
cmdcommon
.
BuildOptions
)
cmdFlags
:=
flag
.
NewFlagSet
(
"build"
,
flag
.
ContinueOnError
)
cmdFlags
.
Usage
=
func
()
{
env
.
Ui
()
.
Say
(
c
.
Help
())
}
cmdFlags
.
BoolVar
(
&
cfgDebug
,
"debug"
,
false
,
"debug mode for builds"
)
cmdFlags
.
BoolVar
(
&
cfgForce
,
"force"
,
false
,
"force a build if artifacts exist"
)
cmdFlags
.
BoolVar
(
&
cfgParallel
,
"parallel"
,
true
,
"enable/disable parallelization"
)
cmdcommon
.
BuildOptionFlags
(
cmdFlags
,
buildOptions
)
if
err
:=
cmdFlags
.
Parse
(
args
);
err
!=
nil
{
return
1
...
...
@@ -176,6 +178,11 @@ func (c Command) Run(env packer.Environment, args []string) int {
wg
.
Wait
()
}
if
!
cfgParallel
{
log
.
Printf
(
"Parallelization disabled, waiting for build to finish: %s"
,
b
.
Name
())
wg
.
Wait
()
}
if
interrupted
{
log
.
Println
(
"Interrupted, not going to start any more builds."
)
break
...
...
command/build/help.go
View file @
b5f153a1
...
...
@@ -13,6 +13,7 @@ Options:
-machine-readable Machine-readable output
-except=foo,bar,baz Build all builds other than these
-only=foo,bar,baz Only build the given builds by name
-parallel=false Disable parallelization (on by default)
-var 'key=value' Variable for templates, can be used multiple times.
-var-file=path JSON file containing user variables.
`
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