Skip to content

Commit

Permalink
Add docs about the magic ENV variables
Browse files Browse the repository at this point in the history
  • Loading branch information
arm4b committed Feb 20, 2023
1 parent ec4b93e commit b4e2a98
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/configuration-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ $tool
* `cli` - object that contains CLI arguments
* `options` - an object that offers additional control over how a tool executes

## Magic Environemnt Variables
Plugin environment variables are automatically mapped to the `bitops.config.yaml` keys. This means that you can use the same environment variable names as in the plugin config. For example, if you want to override the `ansible.cli.skip-tags` value, you can use the `BITOPS_ANSIBLE_SKIP_TAGS` environment variable. In this case, `BITOPS` is the prefix, `ANSIBLE` is the plugin name, and `SKIP_TAGS` is the key name (note hypens are replaced with underscores).

The precedence order is: `ENV` vars > `bitops.config.yaml` values > `bitops.config.schema.yaml` defaults. This way, ENV variables specified by user are taking highest precedence over config values and defaults. We recommend using them dynamically in CI/CD pipelines to control the deployment based on condition (PR run, branch, etc) or manually passing to the the BitOps docker container.

## Arbitrary Environment Variables
During the docker run command, you can specify an ENV var and it will be accessible during all processing stages of BitOps.
During the docker run command, you can specify an ENV var and it will be accessible during all processing stages of BitOps. This is useful for passing in secrets or other values that you don't want to store in your `bitops.config.yaml` file.

## Common Configuration
There are some global configuration options that are shared among all tools and cloud providers during a BitOps run. These are set via environment variables
Expand Down

0 comments on commit b4e2a98

Please sign in to comment.