YAML Snippets Reference in Release
This reference includes some useful snippets to get started when writing DevOps as Code YAML files that can be applied to Release.
This section includes some useful snippets to get started when writing YAML files to apply to Release.
Create a Connections Item
Set up a reusable server connection in Connections:
apiVersion: xl-release/v1
kind: Templates
spec:
- name: Deploy
type: xldeploy.XLDeployServer
url: http://xl-deploy:4516
username: !value XL_DEPLOY_USERNAME
password: !value XL_DEPLOY_PASSWORD
Manage Templates
Create a Template
Create a basic template with one manual task:
apiVersion: xl-release/v1
kind: Templates
spec:
- name: Sample release
type: xlrelease.Release
phases:
- name: DEV
type: xlrelease.Phase
tasks:
- name: Do something
type: xlrelease.Task
Create a Folder Structure
Create nested folders using the directory
construct. You can create templates directly under the directory
:
apiVersion: xl-release/v1
kind: Templates
spec:
- directory: My folder
children:
- directory: Subfolder
children:
- name: My subtemplate
type: xlrelease.Release
note
Folders will be created if they don't already exist.