-
Notifications
You must be signed in to change notification settings - Fork 255
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
Skips to ask specifications for optional workspace #1465
Conversation
The following is the coverage report on the affected files.
|
@pratap0007 Can you please add tests for this |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
0a34d20
to
9963427
Compare
The following is the coverage report on the affected files.
|
/remove-lifecycle stale |
9963427
to
a46a1bf
Compare
The following is the coverage report on the affected files.
|
pkg/cmd/clustertask/start.go
Outdated
@@ -195,6 +196,7 @@ For passing the workspaces via flags: | |||
c.Flags().StringVarP(&opt.PrefixName, "prefix-name", "", "", "specify a prefix for the TaskRun name (must be lowercase alphanumeric characters)") | |||
c.Flags().StringVar(&opt.PodTemplate, "pod-template", "", "local or remote file containing a PodTemplate definition") | |||
c.Flags().BoolVar(&opt.UseParamDefaults, "use-param-defaults", false, "use default parameter values without prompting for input") | |||
c.Flags().BoolVarP(&opt.SkipOptionalWorkspace, "skip-optional-workspace", "", false, "skip to ask specification for optional workspace") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about adding the description -> skips the prompt for optional workspaces
?
pkg/cmd/task/start_test.go
Outdated
func Test_start_task_with_skip_optional_workspace_flag(t *testing.T) { | ||
tasks := []*v1alpha1.Task{ | ||
{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: "task-1", | ||
Namespace: "ns", | ||
}, | ||
Spec: v1alpha1.TaskSpec{ | ||
TaskSpec: v1beta1.TaskSpec{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of using v1alpha1
structs, can we use v1beta1
structs here?
pkg/cmd/task/start.go
Outdated
@@ -218,7 +219,7 @@ For passing the workspaces via flags: | |||
c.Flags().StringVarP(&opt.PrefixName, "prefix-name", "", "", "specify a prefix for the TaskRun name (must be lowercase alphanumeric characters)") | |||
c.Flags().BoolVarP(&opt.UseParamDefaults, "use-param-defaults", "", false, "use default parameter values without prompting for input") | |||
c.Flags().StringVar(&opt.PodTemplate, "pod-template", "", "local or remote file containing a PodTemplate definition") | |||
|
|||
c.Flags().BoolVarP(&opt.SkipOptionalWorkspace, "skip-optional-workspace", "", false, "skip to ask specification for optional workspace") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous
pkg/cmd/pipeline/start.go
Outdated
@@ -191,6 +192,7 @@ For passing the workspaces via flags: | |||
c.Flags().StringVarP(&opt.Filename, "filename", "f", "", "local or remote file name containing a Pipeline definition to start a PipelineRun") | |||
c.Flags().BoolVarP(&opt.UseParamDefaults, "use-param-defaults", "", false, "use default parameter values without prompting for input") | |||
c.Flags().StringVar(&opt.PodTemplate, "pod-template", "", "local or remote file containing a PodTemplate definition") | |||
c.Flags().BoolVarP(&opt.SkipOptionalWorkspace, "skip-optional-workspace", "", false, "skip to ask specification for optional workspace") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
This patch skips to ask specifications for optional workspace in an intractie mode if workspace of t/p/ct is optional and optional workspace skip flag(--skip-optional-workspace) is passed with `tkn t/p/ct start` command Signed-off-by: Shiv Verma <[email protected]>
a46a1bf
to
5d385a9
Compare
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
This patch skips to ask specifications for optional workspace in an interactive mode if workspace of t/p/ct is optional and optional workspace skip flag(--skip-optional-workspace)is passed with
tkn t/p/ct start
commandCloses: #1444
Signed-off-by: Shiv Verma [email protected]
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make check
make generated
See the contribution guide
for more details.
Release Notes