Work with the YAML format for Release
This topic provides information about how to work with the YAML format for Release.
DevOps as Code uses a declarative YAML format to construct specifications that can be executed by Deploy and Release using the XL CLI. This topic provides a reference for the DevOps as Code YAML file structure for each available kind
for Release. It also includes information on using the Spec
section of the YAML file which provides the details of the configuration.
YAML file fields
Release YAML files include a common set of root fields and a kind
field that identifies the type of YAML file.
Root fields
Field name | Description |
---|---|
apiVersion | Digital.ai API (xl-release/v1 or xl/v1 ) and XL CLI version (v1 , v2 and so on) |
kind | See Kind fields for details |
spec | Specifications based on kind . See the Spec section for details |
metadata | Used to define a list of other YAML files to import and home directories |
Kind fields
Product | Kind | Description |
---|---|---|
Release | Templates | Used to model the release flow process. Can include configuration details and have multiple spec sections |
Release | Release | Creates and starts a release from a Release template |
Release | Permissions | Specify global and directory-level permissions for users and roles |
Release | Users | Users that can be assigned to roles |
Release | Roles | Roles that can be assigned global permissions |
Release | Import | Used to list multiple YAML files for sequential execution |
Release | Blueprint | Blueprints YAML files are created from templates that streamline the provisioning process using standardized configurations built on best practices |
Spec section
The spec
section of the Release YAML file has unique fields available depending on the YAML file's kind. Due to the scope, complexity and flexibility of this section, the best way for you to understand the capabilities and constructs used in this section is to:
-
Review YAML generated from existing configurations - You can use the XL CLI
generate
command to generate YAML files for specific kinds from existing configurations or new configurations that you create in Release. -
Use YAML snippets - You can choose from a list of useful, customizable snippets to get started when writing a YAML file. See the YAML snippets reference for DevOps as Code
-
Utilize the Visual Studio Code extension - If you are using the Visual Studio Code editor, Digital.ai provides an extension that adds YAML support for the DevOps Platform to Visual Studio Code. The extension adds the following features:
- Syntax highlighting
- Code completion
- Code validation
- Code formatting
- Code snippets
- Context documentation
To install the extension, and for more information on the supported features, search for "DevOps as Code by Digital.ai" in the Visual Studio Code Marketplace.