Skip to content

Commit

Permalink
update global cli flags documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoehler committed Nov 9, 2023
1 parent 3087c00 commit 2261b7a
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/cli-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,9 @@ See [CPI config](cpi-config.md).
bosh -e vbox -d cf deploy cf.yml -v system_domain=sys.example.com -o large-footprint.yml
```
!!! note
As of bosh-cli version <to_be_updated> the deploy command supports the usage of global flags which are applied to every deploy command automatically. Please refer to [Deploy config](deploy-config.md) for more information.
#### Delete-Deployment {: #delete-deployment }
- `bosh [GLOBAL-CLI-OPTIONS] delete-deployment [--force]` (Alias: `deld`)
Expand Down
55 changes: 55 additions & 0 deletions content/deploy-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
!!! note
This feature is available with bosh-cli-release <version_to_be_updated>.

The Director has a way to specify global flags for all deploy commands. The deploy config is a YAML file that defines global flags that apply to all deployments.

---
## Updating and retrieving deploy config {: #update }

To update deploy config on the Director use [`bosh update-config --type deploy --name <your_configs_name> <your_file>`](cli-v2.md#update-config) CLI command.

!!! note
See [example deploy config](#example1) below.

```shell
bosh update-config --type deploy --name test deploy.yml
bosh config --type deploy --name test
```

```text
Acting as user 'admin' on 'micro'
flags:
- recreate
- fix-releases
include:
- test_deployment
```

The Director will apply the specified flags for the specified deployments during the next `bosh deploy` for that deployment.

---
## Example {: #example1 }

```yaml
flags:
- recreate
- fix-releases
include:
- foo
```
You can include and exclude deployments by using EITHER the `include` or `exclude` property. The [example](#example1) above will only apply the flags if the deployment "foo" gets deployed.
In contrast, the [example](#example2) config below will ensure that only for the "foo" deployment the flags will NOT be applied. Only specifying the `flags` property will apply the flags for all deployments.


```yaml
flags:
- recreate
- fix-releases
exclude:
- foo
```

0 comments on commit 2261b7a

Please sign in to comment.