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

SUP-1560 Add bk build new #183

Merged
merged 6 commits into from
Jan 9, 2024
Merged

SUP-1560 Add bk build new #183

merged 6 commits into from
Jan 9, 2024

Conversation

lizrabuya
Copy link
Contributor

@lizrabuya lizrabuya commented Jan 9, 2024

  • Add bk build new to create build with a pipeline name as argument
  • Add tests for parsing pipeline args

@lizrabuya lizrabuya marked this pull request as ready for review January 9, 2024 02:06
james2791
james2791 previously approved these changes Jan 9, 2024
Copy link
Contributor

@james2791 james2791 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚅

Copy link
Contributor

@jradtilbrook jradtilbrook left a 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

DisableFlagsInUseLine: true,
Use: "new <pipeline> [flags]",
Short: "Creates a new pipeline build",
Args: cobra.ArbitraryArgs,
Copy link
Contributor

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:

Suggested change
Args: cobra.ArbitraryArgs,
Args: cobra.ExactArgs(1),

Copy link
Contributor Author

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.

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)
Copy link
Contributor

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?

`),
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("build new command args here: ", args)
if len(args) == 1 {
Copy link
Contributor

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

@lizrabuya lizrabuya merged commit 0596af3 into 3.x Jan 9, 2024
1 check passed
@lizrabuya lizrabuya deleted the sup-1560-bk-build-new branch January 9, 2024 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants