odo init
: Add new --run-port
flag to set ports into initial Devfile
#6925
Labels
area/init
Issues or PRs related to `odo init`
kind/user-story
An issue of user-story kind
priority/High
Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
sprint demo
Indicates an issue for which a demo should be recorded and presented at the end of the sprint.
Milestone
/kind user-story
/area init
User Story
As an odo user, I want to be able to set the ports when calling
odo init
non-interactively So that I can have my Devfile initialized right away with the right ports without having to edit it later on.#5863 added the ability to automatically detect my application ports from the source code and use that as ports when initializing a Devfile interactively. Still, as a user, I also want to be able to specify such port(s) non-interactively.
This is mainly useful to support the port detection feature in the IDE extensions: redhat-developer/vscode-openshift-tools#2781. The IDE extensions workflow would be:
odo analyze
to detect things from the source code, like the Devfile, the component name, and application portsodo init
to (non-interactively) initialize a Devfile with the ports set in the right container componentAs discussed in #6211 (comment), there might be issues with Devfiles with more than one container component.
Acceptance Criteria
--run-port int
flag, which would look for any default run command (or the single non-default run command if any) and find the container component in which this run command runs.exec
commandexec
run commandExamples:
Links
/kind user-story
The text was updated successfully, but these errors were encountered: