Skip to content

Commit ea6be62

Browse files
committed
Document some environment variables
1 parent 504d7f3 commit ea6be62

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ The example above reflects the changes in the Puppet catalog from switching an u
5353
- [Requirements](/doc/requirements.md)
5454
- [Limitations](/doc/limitations.md)
5555
- [List of all command line options](/doc/optionsref.md)
56+
- [Environment variables](/doc/advanced-environment-variables.md)
5657

5758
### Project
5859

doc/advanced-environment-variables.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Environment variables
2+
3+
The following environment variables have special meaning to octocatalog-diff:
4+
5+
### `OCTOCATALOG_DIFF_CONFIG_FILE`
6+
7+
### `OCTOCATALOG_DIFF_CUSTOM_VERSION`
8+
9+
When set, the `octocatalog-diff` CLI will display this as the version number within debugging, instead of the version number in the package. This is most useful if you want to use or include a git SHA in the version number.
10+
11+
```
12+
$ export OCTOCATALOG_DIFF_CUSTOM_VERSION="@$(git rev-parse HEAD)"
13+
$ octocatalog-diff -d ...
14+
D, [2017-10-12T08:57:46.454738 #35205] DEBUG -- : Running octocatalog-diff @504d7f3c91267e5193beb103caae5d4d8cebfee3 with ruby 2.3.1
15+
...
16+
```
17+
18+
### `OCTOCATALOG_DIFF_DEVELOPER_PATH`
19+
20+
When set, instead of loading libraries from the system or bundler location, libraries will be loaded from the specified value of this environment variable. This is used internally for development as we point users to unreleased code for debugging or testing.
21+
22+
```
23+
$ export OCTOCATALOG_DIFF_DEVELOPER_PATH=$HOME/git-checkouts/octocatalog-diff
24+
$ octocatalog-diff ...
25+
```
26+
27+
### `OCTOCATALOG_DIFF_TEMPDIR`
28+
29+
When set:
30+
31+
- `octocatalog-diff` will create all of its temporary directories within the specified directory.
32+
- `octocatalog-diff` will not attempt to remove any temporary directories it creates.
33+
34+
This is useful in the following situations:
35+
36+
- You are calling `octocatalog-diff` from within another program which is highly parallelized, and `at_exit` handlers are difficult to implement. Instead of figuring that all out (if it can even be figured out), you create a temporary directory before the parallelized logic, and remove it afterwards.
37+
38+
- You wish to debug intermediate output. For example, you may be instructed to set this variable and send some of the output to the project maintainers if you request assistance.
39+
40+
This variable is used internally for the parallelized logic for catalog compilation, but the value set from the environment will override any internal usage.
41+
42+
### `OCTOCATALOG_DIFF_VERSION`
43+
44+
### `PUPPETDB_HOST`
45+
46+
### `PUPPETDB_PORT`
47+
48+
### `PUPPETDB_URL`
49+
50+
### `PUPPET_FACT_DIR`

0 commit comments

Comments
 (0)