odo
odo copied to clipboard
odo should support `project` devfile object
/kind feature
Which functionality do you think we should add?
odo should add support for project
devfile object.
Projects worked on in the devworkspace, containing names and sources locations.
projects: object[]
Projects worked on in the devworkspace, containing names and sources locations
object
git: object
Project's Git source
zip: object
Project's Zip source
attributes: object
Map of implementation-dependant free-form YAML attributes.
clonePath: string
Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.
name: string (up to 63 chars) , must match ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
Project name
Currently, it is not supported and pushing a component fails.
Check https://github.com/gnunn-gitops/product-catalog-server/ to work with this feature.
Why is this needed?
Currently having a project stanza in the devfile.yaml stops odo from working, unfortunately this stanza is used by other tools such as CodeReady Workspaces. IMHO Odo should be able to work when this stanza is in place however it should just ignore any references to git repositories and use the local code.
/priority high
I do see a test that tests for multiple projects https://github.com/openshift/odo/blob/v2/tests/integration/devfile/cmd_devfile_push_test.go#L304, it seems that project
is supported(?).
@gnunn1 odo dev
is working as expected if we take your https://github.com/redhat-developer/odo/issues/5129#issuecomment-938148214 into consideration. It copies the local data in a directory named after the project name under /projects/
, instead of the content from remote git repo.
I modified the projects block to ensure it was working as expected.
`projects` block from `devfile.yaml`
projects:
- name: my-product-catalog-server
git:
remotes:
origin: "https://github.com/valaparthvi/valaparthvi.github.io.git"
checkoutFrom:
revision: master
Local content
➜ git:(master) ✗ ls
build-image.sh codeready devfile-v2.yaml Jenkinsfile mvnw.cmd README.md tests
build-native.sh containers devfile.yaml mvnw pom.xml src
Content inside the container
sh-4.4$ ls /projects
my-product-catalog-server
sh-4.4$ ls /projects/my-product-catalog-server
Jenkinsfile devfile.yaml
README.md mvnw
build-image.sh mvnw.cmd
build-native.sh pom.xml
codeready src
containers tests
devfile-v2.yaml
Can you please test this issue once at your end to confirm it's working as expected?
the plan on the devfile side is to move away from the project
. Even the CRW/Che is moving away from using project
field.
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.
This issue was closed because it has been inactive for 30 days since being marked as stale.