-
Notifications
You must be signed in to change notification settings - Fork 244
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
odo init
json output
#5658
odo init
json output
#5658
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
482b02d
to
716a3f3
Compare
pkg/odo/cli/init/init.go
Outdated
commands, _ := devfileObj.Data.GetCommands(common.DevfileOptions{ | ||
CommandOptions: common.CommandOptions{ | ||
CommandGroupKind: v1alpha2.DeployCommandGroupKind, | ||
}, | ||
}) | ||
if len(commands) != 0 { | ||
exitMessage += "\nTo deploy your component to a cluster use \"odo deploy\"." | ||
} |
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.
Can you replace this with libdevfile.HasDeployCommand()
method?
commands, _ := devfileObj.Data.GetCommands(common.DevfileOptions{ | |
CommandOptions: common.CommandOptions{ | |
CommandGroupKind: v1alpha2.DeployCommandGroupKind, | |
}, | |
}) | |
if len(commands) != 0 { | |
exitMessage += "\nTo deploy your component to a cluster use \"odo deploy\"." | |
} | |
if libdevfile.HasDeployCommand(devfileObj.Data) { | |
exitMessage += "\nTo deploy your component to a cluster use \"odo deploy\"." | |
} |
dc034e1
to
847138c
Compare
ForwardedPorts: []api.ForwardedPort{}, | ||
RunningIn: []api.RunningMode{}, | ||
ManagedBy: "odo", |
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.
Can you also add these fields in the JSON output in the docs?
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 added a few comments, mainly for cosmetic changes. LGTM otherwise after testing your changes.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: valaparthvi 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 |
* odo init -o json * docs * fix header and json * Make DevfileLocation part of api package * Add Component api kind * odo init -o json return value * Document api package * Update tests * review * Error when json output and no flags * Update doc * review
What type of PR is this:
/kind feature
What does this PR do / why we need it:
pkg/api
packageWhich issue(s) this PR fixes:
Fixes #5645
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: