DevOps as Code uses the declarative XL YAML format to construct specifications that can be executed by XL Deploy and XL Release using the XL CLI.

This topic provides a reference for the XL YAML file structure for each available kind for XL Deploy and XL Release.

Root YAML fields

Field name Description
apiVersion XebiaLabs API (xl-deploy/v1, 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 Can include standard metadata such as ProjectName, Description, Author, and Version. Can also be used to define a list of other YAML files to import and home directories.

Kind fields

The kind is an identifier for the type of YAML file.

Product Kind Description
XL Deploy Applications Deployment packages containing the physical files (artifacts) that comprise a version of an application
XL Deploy Infrastructure Servers, databases and middleware to which you deploy your applications
XL Deploy Environments Specific infrastructure (e.g., Dev, QA, Production) to which you deploy your applications.
XL Deploy Configuration Configuration details such as credentials, policies, notifications and triggers
XL Deploy Deployment Starts a deployment using the details in the spec section
XL Release Templates Used to model the release flow process. Can include configuration details and have multiple spec sections
XL Release Release Creates and starts a release from a XL Release template
All Import Used to list multiple YAML files for sequential execution
All 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 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 examine specific examples.

Generate YAML files from existing configurations

You can use the XL CLI generate command to generate YAML files for specific kinds from existing configurations in XL Deploy and XL Release. For more information, see Getting started with DevOps as Code

Use YAML snippets

You can choose from a list of useful, customizable snippets to get started when writing a YAML file. For more information, see: