From ffb8ba8d2ff0b3b7202f5fddd244db4cd3676561 Mon Sep 17 00:00:00 2001 From: mik-dass Date: Mon, 3 May 2021 11:57:12 +0530 Subject: [PATCH 1/3] Adds a document regarding the odo.dev.push.path attributes in the devfile --- ...g-devfile-odo.dev.push.path-attribute.adoc | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docs/public/using-devfile-odo.dev.push.path-attribute.adoc diff --git a/docs/public/using-devfile-odo.dev.push.path-attribute.adoc b/docs/public/using-devfile-odo.dev.push.path-attribute.adoc new file mode 100644 index 00000000000..a256dd5c6bf --- /dev/null +++ b/docs/public/using-devfile-odo.dev.push.path-attribute.adoc @@ -0,0 +1,29 @@ +# Using the odo.dev.push.path related attributes + +`odo` uses the `odo.dev.push.path` related attribute from the devfile's run commands to push only specific files and folders to the component. The format of the attribute is `odo.dev.push.path::` + +```yaml +commands: + - id: dev-run + attributes: + "dev.odo.push.path:target/quarkus-app": "target/quarkus-app" + exec: + component: tools + commandLine: "java -jar target/quarkus-app/quarkus-run.jar -Dquarkus.http.host=0.0.0.0" + hotReloadCapable: true + group: + kind: run + isDefault: true + workingDir: $PROJECTS_ROOT + - id: dev-debug + exec: + component: tools + commandLine: "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/quarkus-app/quarkus-run.jar -Dquarkus.http.host=0.0.0.0" + hotReloadCapable: true + group: + kind: debug + isDefault: true + workingDir: $PROJECTS_ROOT +``` + +In the above example the contents of the `quarkus-app` folder, which is inside the `target` folder, will be pushed to the remote location of `target/quarkus-app`. The local path is relative to the component's local folder. The remote location is relative to the folder containing the component's source code inside the container. \ No newline at end of file From 1b501abd8b8712b250322221aee385614692372d Mon Sep 17 00:00:00 2001 From: mik-dass Date: Mon, 17 May 2021 16:32:13 +0530 Subject: [PATCH 2/3] Modifies the example to use a different relative path than the local one --- .../public/using-devfile-odo.dev.push.path-attribute.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/public/using-devfile-odo.dev.push.path-attribute.adoc b/docs/public/using-devfile-odo.dev.push.path-attribute.adoc index a256dd5c6bf..03fb194ae58 100644 --- a/docs/public/using-devfile-odo.dev.push.path-attribute.adoc +++ b/docs/public/using-devfile-odo.dev.push.path-attribute.adoc @@ -1,15 +1,15 @@ # Using the odo.dev.push.path related attributes -`odo` uses the `odo.dev.push.path` related attribute from the devfile's run commands to push only specific files and folders to the component. The format of the attribute is `odo.dev.push.path::` +`odo` uses the `odo.dev.push.path` related attribute from the devfile's run commands to push only the specified files and folders to the component. The format of the attribute is `"odo.dev.push.path:": ""` ```yaml commands: - id: dev-run attributes: - "dev.odo.push.path:target/quarkus-app": "target/quarkus-app" + "dev.odo.push.path:target/quarkus-app": "remote-target/quarkus-app" exec: component: tools - commandLine: "java -jar target/quarkus-app/quarkus-run.jar -Dquarkus.http.host=0.0.0.0" + commandLine: "java -jar remote-target/quarkus-app/quarkus-run.jar -Dquarkus.http.host=0.0.0.0" hotReloadCapable: true group: kind: run @@ -18,7 +18,7 @@ commands: - id: dev-debug exec: component: tools - commandLine: "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/quarkus-app/quarkus-run.jar -Dquarkus.http.host=0.0.0.0" + commandLine: "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar remote-target/quarkus-app/quarkus-run.jar -Dquarkus.http.host=0.0.0.0" hotReloadCapable: true group: kind: debug From 011017e4ea57ca1359ee3b73e6018cc7664ef4a6 Mon Sep 17 00:00:00 2001 From: mik-dass Date: Mon, 17 May 2021 17:54:16 +0530 Subject: [PATCH 3/3] Adds a mention about multiple attributes and fixes the description for the example --- docs/public/using-devfile-odo.dev.push.path-attribute.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/public/using-devfile-odo.dev.push.path-attribute.adoc b/docs/public/using-devfile-odo.dev.push.path-attribute.adoc index 03fb194ae58..2b2ed0bcb3c 100644 --- a/docs/public/using-devfile-odo.dev.push.path-attribute.adoc +++ b/docs/public/using-devfile-odo.dev.push.path-attribute.adoc @@ -1,12 +1,13 @@ # Using the odo.dev.push.path related attributes -`odo` uses the `odo.dev.push.path` related attribute from the devfile's run commands to push only the specified files and folders to the component. The format of the attribute is `"odo.dev.push.path:": ""` +`odo` uses the `odo.dev.push.path` related attribute from the devfile's run commands to push only the specified files and folders to the component. The format of the attribute is `"odo.dev.push.path:": ""`. We can mention multiple such attributes in the run command's `attributes` section. ```yaml commands: - id: dev-run attributes: "dev.odo.push.path:target/quarkus-app": "remote-target/quarkus-app" + "dev.odo.push.path:README.txt": "docs/README.txt" exec: component: tools commandLine: "java -jar remote-target/quarkus-app/quarkus-run.jar -Dquarkus.http.host=0.0.0.0" @@ -26,4 +27,4 @@ commands: workingDir: $PROJECTS_ROOT ``` -In the above example the contents of the `quarkus-app` folder, which is inside the `target` folder, will be pushed to the remote location of `target/quarkus-app`. The local path is relative to the component's local folder. The remote location is relative to the folder containing the component's source code inside the container. \ No newline at end of file +In the above example the contents of the `quarkus-app` folder, which is inside the `target` folder, will be pushed to the remote location of `remote-target/quarkus-app` and the file `README.txt` will be pushed to `doc/README.txt`. The local path is relative to the component's local folder. The remote location is relative to the folder containing the component's source code inside the container. \ No newline at end of file