Skip to content

Commit

Permalink
Adds flag success-build-history-limit and failed-build-history-limit
Browse files Browse the repository at this point in the history
without defaults
  • Loading branch information
fcaroline2020 committed Sep 1, 2023
1 parent 0217c9e commit 6d34520
Show file tree
Hide file tree
Showing 11 changed files with 262 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/kp_image_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ kp image create my-image --tag my-registry.com/my-repo --blob https://my-blob-ho
resource with generated container image references. A "kubectl apply -f" of the
resource from --output without image uploads will result in a reconcile failure.
-e, --env stringArray build time environment variables
--failed-build-history-limit string set the failedBuildHistoryLimit
--git string git repository url
--git-revision string git revision such as commit, tag, or branch (default "main")
-h, --help help for create
Expand All @@ -77,6 +78,7 @@ kp image create my-image --tag my-registry.com/my-repo --blob https://my-blob-ho
--service-account string service account name to use (default "default")
-s, --service-binding stringArray build time service bindings
--sub-path string build code at the sub path located within the source code directory
--success-build-history-limit string set the successBuildHistoryLimit
-t, --tag string registry location where the OCI image will be created
-w, --wait wait for image create to be reconciled and tail resulting build logs
```
Expand Down
2 changes: 2 additions & 0 deletions docs/kp_image_patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ kp image patch my-image --tag my-registry.com/my-repo --blob https://my-blob-hos
resource with generated container image references. A "kubectl apply -f" of the
resource from --output without image uploads will result in a reconcile failure.
-e, --env stringArray build time environment variables to add/replace
--failed-build-history-limit string set the failedBuildHistoryLimit
--git string git repository url
--git-revision string git revision such as commit, tag, or branch (default "main")
-h, --help help for patch
Expand All @@ -79,6 +80,7 @@ kp image patch my-image --tag my-registry.com/my-repo --blob https://my-blob-hos
--service-account string service account name to use
-s, --service-binding stringArray build time service bindings to add/replace
--sub-path string build code at the sub path located within the source code directory
--success-build-history-limit string set the successBuildHistoryLimit
-w, --wait wait for image resource patch to be reconciled and tail resulting build logs
```

Expand Down
2 changes: 2 additions & 0 deletions docs/kp_image_save.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ kp image save my-image --tag my-registry.com/my-repo --blob https://my-blob-host
resource with generated container image references. A "kubectl apply -f" of the
resource from --output without image uploads will result in a reconcile failure.
-e, --env stringArray build time environment variables
--failed-build-history-limit string set the failedBuildHistoryLimit
--git string git repository url
--git-revision string git revision such as commit, tag, or branch (default "main")
-h, --help help for save
Expand All @@ -83,6 +84,7 @@ kp image save my-image --tag my-registry.com/my-repo --blob https://my-blob-host
--service-account string service account name to use
-s, --service-binding stringArray build time service bindings to add/replace
--sub-path string build code at the sub path located within the source code directory
--success-build-history-limit string set the successBuildHistoryLimit
-t, --tag string registry location where the image will be created
-w, --wait wait for image create to be reconciled and tail resulting build logs
```
Expand Down
2 changes: 2 additions & 0 deletions pkg/commands/image/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ kp image create my-image --tag my-registry.com/my-repo --blob https://my-blob-ho
cmd.Flags().StringArrayVarP(&factory.Env, "env", "e", []string{}, "build time environment variables")
cmd.Flags().StringArrayVarP(&factory.ServiceBinding, "service-binding", "s", []string{}, "build time service bindings")
cmd.Flags().StringVar(&factory.CacheSize, "cache-size", "", "cache size as a kubernetes quantity (default \"2G\")")
cmd.Flags().StringVar(&factory.SuccessBuildHistoryLimit, "success-build-history-limit", "", "set the successBuildHistoryLimit")
cmd.Flags().StringVar(&factory.FailedBuildHistoryLimit, "failed-build-history-limit", "", "set the failedBuildHistoryLimit")
cmd.Flags().StringVar(&factory.ServiceAccount, "service-account", "default", "service account name to use")
cmd.Flags().BoolP("wait", "w", false, "wait for image create to be reconciled and tail resulting build logs")
commands.SetImgUploadDryRunOutputFlags(cmd)
Expand Down
Loading

0 comments on commit 6d34520

Please sign in to comment.