Skip to content
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

Adds a document regarding the odo.dev.push.path attributes in the devfile #4681

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/public/using-devfile-odo.dev.push.path-attribute.adoc
Original file line number Diff line number Diff line change
@@ -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:<local_relative_path>:<remote_relative_path>`
feloy marked this conversation as resolved.
Show resolved Hide resolved
feloy marked this conversation as resolved.
Show resolved Hide resolved

```yaml
commands:
- id: dev-run
attributes:
"dev.odo.push.path:target/quarkus-app": "target/quarkus-app"
feloy marked this conversation as resolved.
Show resolved Hide resolved
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.