-
Notifications
You must be signed in to change notification settings - Fork 44
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
SUP-1560 Add bk build new #183
Conversation
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.
🚅
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.
Looks good. Just a few things
pkg/cmd/build/new.go
Outdated
DisableFlagsInUseLine: true, | ||
Use: "new <pipeline> [flags]", | ||
Short: "Creates a new pipeline build", | ||
Args: cobra.ArbitraryArgs, |
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.
I think this should be:
Args: cobra.ArbitraryArgs, | |
Args: cobra.ExactArgs(1), |
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.
I'll make this change together with the suggestions below.
pkg/cmd/build/new.go
Outdated
It accepts {pipeline_slug}, {org_slug}/{pipeline_slug} or a full URL to the pipeline as an argument. | ||
`), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
fmt.Println("build new command args here: ", args) |
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.
Looks like debugging left in?
pkg/cmd/build/new.go
Outdated
`), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
fmt.Println("build new command args here: ", args) | ||
if len(args) == 1 { |
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.
You won't need this with the change to line 26 above
bk build new
to create build with a pipeline name as argument