Skip to content

Commit

Permalink
Add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Jun 2, 2022
1 parent 4bea72f commit 18031d6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ components:
- name: main
image: {{CONTAINER_IMAGE}}
```

## Sustituting variables

The Devfile can define variables to make the Devfile parameterizable. The Devfile can define values for these variables, and you
can override the values for variables from the command line when running `odo deploy`, using the `--var` and `--var-file` options.

See [Sustituting variables in odo dev](dev.md#sustituting-variables) for more information.
11 changes: 11 additions & 0 deletions docs/website/versioned_docs/version-3.0.0/command-reference/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ In the above example, three things have happened:
You can press Ctrl-c at any time to terminate the development session. The command can take a few moment to terminate, as it
will first delete all resources deployed into the cluster for this session before terminating.
### Sustituting variables
The Devfile can define variables to make the Devfile parameterizable. The Devfile can define values for these variables, and you
can override the values for variables from the command line when running `odo dev`, using the `--var` and `--var-file` options.
The `--var` option takes a comma-separated list of `variable=value` pairs, where `=value` is optional. If the `=value` is omitted, the value is extracted from the environment variable named `variable`. In this case, if the environment variable with this name is not defined, the value defined into the Devfile will be used.
The `--var-file` option takes a filename as argument. The file contains a line-separated list of `variable=value` pairs, with the same behaviour as before.
Note that the values passed with the `--var` option overrides the values obtained with the `--var-file` option.
## Devfile (Advanced Usage)
Expand Down

0 comments on commit 18031d6

Please sign in to comment.