Conversation
Foresight Summary
View More Details✅ CI workflow has finished in 26 seconds and finished at 20th Feb, 2023.
*You can configure Foresight comments in your organization settings page. |
| ``` | ||
| ```yaml | ||
| ansible: | ||
| cli: {} |
There was a problem hiding this comment.
Something seems wrong with this schema..
There was a problem hiding this comment.
Anything specific that's wrong in this schema?
That's the empty schema example we allow for any plugin.
Here is from Terraform: https://bitops.sh/tool-configuration/configuration-terraform/#example-bitopsconfigyaml-minimum-required
Maybe it's good to make it even smaller for a quick start defaults like
ansible: {}There was a problem hiding this comment.
This is my apologies. I just noticed the below YAML isn't a continuation it's a different block entirely.
docs/configuration-base.md
Outdated
| ## 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. |
There was a problem hiding this comment.
Looking for feedback on this ^^
Is there any better naming for the Magic Environment Variables?
There was a problem hiding this comment.
Updated with Environment Variables Defaulting per @PhillypHenning
| # CLI properties will composed into a CLI string and exported as "${BITOPS_MY_PLUGIN_CLI}" | ||
| cli: | ||
| type: object | ||
| properties: | ||
| # positional argument, if no `parameter` set | ||
| # ex: "run" | ||
| command: | ||
| type: string | ||
| default: run | ||
| required: true | ||
| # cli argument | ||
| # ex: "--key=value" | ||
| key: | ||
| parameter: key | ||
| type: string | ||
| # boolean flag, set if value is `true` | ||
| # ex: "--bar" | ||
| bar: | ||
| parameter: bar | ||
| type: boolean | ||
| default: true |
There was a problem hiding this comment.
New schema to CLI example
Update documentation following the #403 and bitops-plugins/ansible#11