Compose
On this page
Description
The updatecli compose feature allows specifying a list of updatecli policies to enforce. This is useful when applying the same policies on multiple repositories.
By default, it relies on a file named "updatecli-compose.yaml" such as in the follow example:
policies:
- name: Local Updatecli Website Policies
config:
- updatecli/updatecli.d/
- name: Handle Nodejs version in githubaction
policy: ghcr.io/updatecli/policies/policies/nodejs/githubaction:latest
values:
- updatecli/values.d/scm.yaml
- updatecli/values.d/nodejs.yaml
-
Running
updatecli compose applywould enforce the state defined in each of the policies -
Running
updatecli compose diffwould show the targeted state defined in each of the policies -
Running
updatecli compose showwould show the manifest generated by each of the policies
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| env_files | array | Env_files contains a list of environment files Example:
|
|
| environments | object | Environment contains a list of environment variables Example: ENV_VAR1: value1 ENV_VAR2: value2 |
|
| include | array | Include contains a list of compose files to include | |
| name | string | Name contains the compose name | |
| policies | array | Policies contains a list of policies | |
| config | array | Config contains a list of Updatecli config file path | |
| id | string | ID contains the policy ID, it can be used to filter policies to execute | |
| name | string | Name contains the policy name | |
| policy | string | Policy contains the policy OCI name | |
| secrets | array | Secrets contains a list of Updatecli secret file path | |
| values | array | Values contains a list of Updatecli config file path | |
| valuesinline | object | ValuesInline contains a list of inline values for Updatecli config A deep merge will be performed between global inline values and policy inline values if both are defined. Example: key1: value1 key2: value2 |
|
| secrets | array | Secrets contains a list of Updatecli secret file path This is the default secret file that will be applied to all policies if not overridden by the policy secret file. | |
| values | array | Values contains a list of Updatecli config file path This is the default values file that will be applied to all policies if not overridden by the policy values file. | |
| valuesinline | object | ValuesInline contains a list of inline values for Updatecli config This is the default inline values that will be applied to all policies if not overridden by the policy inline values. A deep merge will be performed between global inline values and policy inline values if both are defined. Example: key1: value1 key2: value2 |
|
Important
|
Any value files or secrets file specified in the docker-compose.yaml overrides default values specified by the policy. It’s also worth mentioning that deep merge isn’t supported.
|
Examples
Updatecli
The repository updatecli/policies contains a list of common updatecli policies published on GitHub Registry.