-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: adds abilty to create build pipeline job #102
Conversation
5c134e9
to
1d2024b
Compare
bump |
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.
Suggested changes
if appName == nil || *appName == "" { | ||
return errors.New("application name is required") | ||
} |
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.
if appName == nil || *appName == "" { | |
return errors.New("application name is required") | |
} | |
if appName == nil || *appName == "" || branch == "" { | |
return errors.New("application name and branch are required") | |
} |
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.
Branch is mandatory here
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.
Or add following
if err := createBuildPipelineJobCmd.MarkFlagRequired(flagnames.Application); err != nil {
log.Fatalf("Error during command initialization: %v", err)
}
instead of
if appName == nil || *appName == "" {
return errors.New("application name is required")
}
to be consistent
} | ||
|
||
jobName := newJob.GetPayload().Name | ||
log.SetOutput(cmd.OutOrStdout()) |
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.
log.SetOutput(cmd.OutOrStdout()) |
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.
Log output has to be uniformal with other commands
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.
Radix CLI prints to stdout only objects , e.g.
radix-cli/cmd/validateRadixConfig.go
Line 180 in 723000d
fmt.Fprintf(os.Stdout, "%s", b) |
messages it prints to stderr
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.
These requested changes are to keep the product and its code consistent. The PR unfortunately cannot be approved without these changes.
53e0950
to
af7d5e0
Compare
af7d5e0
to
df4b77d
Compare
df4b77d
to
e3739f8
Compare
This code is used (with applied requested changes) to this version](https://github.com/equinor/radix-cli/releases/tag/v1.23.0) |
This pull request adds the
build
command tocreate pipeline-job
.The logic/plumbing to create a build pipeline was already present. I just added the cobra command itself.