Comment on page
You can add labels to deployment groups and targets with the
labelsproperty, which accepts a single label or a list of labels. Deployment groups and targets inherit labels from the deployment group they belong to and can have labels of their own but can't remove the inherited labels.
You can use labels to choose which deployment targets to include in commands. For example, you can deploy only those targets that have a dev label.
Let's add label app to targets dev-environment and prod-environment, and another label others to infra and sandbox targets. We could use these labels to deploy all application targets (targets with the app label).
- name: infra
- name: dev-environment
- name: sandbox
- name: prod-environment