1
0
mirror of https://github.com/ko-build/ko.git synced 2025-07-15 23:54:17 +02:00

Add build.Limiter (#79)

* Add build.Limiter

You can limit the number of concurrent builds with -j (a la make).

The default value for this is GOMAXPROCS, which seems reasonable.
This commit is contained in:
jonjohnsonjr
2019-09-11 10:07:02 -07:00
committed by GitHub
parent 3a17dee60a
commit 99a587ede5
34 changed files with 355 additions and 5829 deletions

View File

@ -32,9 +32,9 @@ func addCreate(topLevel *cobra.Command) {
no := &options.NameOptions{}
fo := &options.FilenameOptions{}
ta := &options.TagsOptions{}
do := &options.DebugOptions{}
so := &options.SelectorOptions{}
sto := &options.StrictOptions{}
bo := &options.BuildOptions{}
create := &cobra.Command{
Use: "create -f FILENAME",
Short: "Create the input files with image references resolved to built/pushed image digests.",
@ -64,7 +64,7 @@ func addCreate(topLevel *cobra.Command) {
cat config.yaml | ko create -f -`,
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
builder, err := makeBuilder(do)
builder, err := makeBuilder(bo)
if err != nil {
log.Fatalf("error creating builder: %v", err)
}
@ -130,9 +130,9 @@ func addCreate(topLevel *cobra.Command) {
options.AddNamingArgs(create, no)
options.AddFileArg(create, fo)
options.AddTagsArg(create, ta)
options.AddDebugArg(create, do)
options.AddSelectorArg(create, so)
options.AddStrictArg(create, sto)
options.AddBuildOptions(create, bo)
// Collect the ko-specific apply flags before registering the kubectl global
// flags so that we can ignore them when passing kubectl global flags through