Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue-172] Adds flag success-build-history-limit and failed-build-history-limit #334

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 number of failed builds to keep, leave empty to use cluster default
--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 number of successful builds to keep, leave empty to use cluster default
-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 number of failed builds to keep, leave empty to use cluster default
--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 number of successful builds to keep, leave empty to use cluster default
-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 number of failed builds to keep, leave empty to use cluster default
--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 number of successful builds to keep, leave empty to use cluster default
-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", "", "number of successful builds to keep, leave empty to use cluster default")
cmd.Flags().StringVar(&factory.FailedBuildHistoryLimit, "failed-build-history-limit", "", "number of failed builds to keep, leave empty to use cluster default")
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