-
Notifications
You must be signed in to change notification settings - Fork 242
Add support for SourceMapping field in devfiles #3295
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
Add support for SourceMapping field in devfiles #3295
Conversation
Signed-off-by: John Collier <[email protected]>
Signed-off-by: John Collier <[email protected]>
Signed-off-by: John Collier <[email protected]>
Removing WIP tag now that integration tests have been added |
Signed-off-by: John Collier <[email protected]>
Signed-off-by: John Collier <[email protected]>
@@ -0,0 +1,40 @@ | |||
schemaVersion: 2.0.0 | |||
metadata: | |||
name: nodejs |
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 can see only devfileSourceMapping.yaml for nodejs
component type. So i think this pr only handles for nodejs
type and later other supported devfile component type will be added, right ?
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.
The sample devfile I used is nodejs, but the implementation of sourceMapping
isn't specific to any devfile or runtime, so other devfiles don't need to be added, as it would be testing the same functionality.
@@ -83,6 +83,31 @@ var _ = Describe("odo devfile push command tests", func() { | |||
helper.CmdShouldPass("odo", "push", "--devfile", "devfile.yaml", "--project", namespace) | |||
}) | |||
|
|||
It("checks that odo push works with a devfile with sourcemapping set", func() { | |||
helper.CmdShouldPass("odo", "create", "nodejs", "--project", namespace, cmpName) |
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 am not confused why we are only looking for nodejs? Why not springboot
?
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.
This is required since --devfile
isn't supported in odo create
(see #3118), so this is a necessary step for all tests for devfiles currently (see the remainder of the tests in that file). So we have to run odo create
first, then copy over the devfile we need to test.
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.
LGTM
/retest |
Signed-off-by: John Collier <[email protected]>
/retest Please review the full test history for this PR and help us cut down flakes. |
16 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
Signed-off-by: John Collier <[email protected]>
Signed-off-by: John Collier <[email protected]>
/lgtm |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
What type of PR is this?
/kind feature
/area devfileV2
What does does this PR do / why we need it:
This PR adds support for the new
SourceMapping
field in devfile v2. When it is set, odo will mount the project source volume to that folder, rather than/projects
or/projects/<projectName>
.Which issue(s) this PR fixes:
Fixes #2935
How to test changes / Special notes to the reviewer:
Use this sample V2 devfile and verify that it syncs to
/test
:I've also updated the odo push integration tests for Kube and Docker to test this scenario.