Skip to main content
Version: Deploy 23.1

XL Command Line Interface reference

The xl command line tool provides a fast and straightforward method for provisioning Digital.ai Release, Deploy, and Remote Runner servers using YAML files. The YAML files can include items such as releases, pipelines, applications, infrastructure, and target environments. In addition, the XL CLI is used for installing or upgrading Digital.ai Deploy and Release.

Usage

xl [command]

Available Commands

CommandDescription
applyApply configuration changes
blueprintCreate a Blueprint
generateGenerate configuration
helpHelp about any command
ideIDE commands
licenseDisplay license info
kubeInstall, upgrade, or clean Digital.ai Deploy or Release using Operator.
previewPreview Deployment
up[BETA Feature] Install XLR, XLD via XL-Seed
versionDisplay version info
wrapperGenerate XL wrapper

Flags

FlagDescription
--blueprint-current-repository stringCurrent active blueprint repository name
--config stringconfig file (default: $HOME/.xebialabs/config.yaml)
-h, --helphelp for xl
-q, --quietsuppress all output, except for errors
-v, --verboseverbose output
--xl-deploy-authmethod stringAuthentication method to access the Digital.ai Deploy server (default "http")
--xl-deploy-password stringPassword to access the Digital.ai Deploy server (default "admin")
--xl-deploy-url stringURL to access the Digital.ai Deploy server (default http://localhost:4516/)
--xl-deploy-username stringUsername to access the Digital.ai Deploy server (default "admin")
--xl-release-authmethod stringAuthentication method to access the Digital.ai Release server (default "http")
--xl-release-password stringPassword to access the Digital.ai Release server (default "admin")
--xl-release-url stringURL to access the Digital.ai Release server (default http://localhost:5516/)
--xl-release-username stringUsername to access the Digital.ai Release server (default "admin")
note

Use xl [command] --help for more information about a command.

xl apply Command

Use the xl apply command to execute YAML specifications.

Syntax

xl apply [flag] [value]

Command-specific flags

FlagDescription
-d, --detachDetach the client at the moment of starting a deployment or release
-f, --file stringarrayRequired. Path(s) to the file(s) to apply
-h, --helpHelp for the apply command
-s, --include-scm-infoSend source control information. Fails if source control information cannot be found or is dirty.
For more information, see Source control management in YAML
-non-interactiveAutomatically archive finished deployment tasks
-p, --proceed-when-dirtyProceed with applying changes even if repository is dirty
This is used together with the s, --include-scm-info flag. For more information, see Proceed-when-dirty flag
--values stringToStringValues (default [])

File order processing

You must choose at least one YAML file to perform an apply operation, but if you want to execute two or more YAML files, you can use one of the following methods:

Import kind YAML : The preferred method is to use a separate YAML file of the kind "Import" and list the YAML files to apply in order.

For example, you can create a YAML file called import-yamls.yaml

apiVersion: xl/v1
kind: Import
metadata:
imports:
- infra.yaml
- env.yaml
- app.yaml
- xlr-pipeline.yaml

Using this method, you can then simply run the xl apply -f /tmp/import-yamls.yaml file which will in turn sequentially run the YAML files listed in the imports: section.

String multiple files in the CLI: You can also specify multiple YAML files to apply in order when running the xl apply command. For example:

xl apply -f /tmp/infra.yaml -f /tmp/env.yaml -f /tmp/app.yaml -f xlr-pipeline.yaml

Examples

xl apply -f /tmp/infra.yaml
xl apply -f /tmp/infra.yaml -f /tmp/env.yaml -f /tmp/app.yaml -f /tmp/xlr-pipeline.yaml
xl apply -f xebialabs.yaml -d

xl blueprint Command

You can use the xl blueprint command to run blueprints.

Syntax

xl blueprint [flag] [parameter]

Global Flags

  • -blueprint-current-repository: can be used to override the current-repository field of the blueprint configuration. See About Blueprint repositories for more information.

Command-specific flags

Option (short)Option (long)Default valueExamplesDescription
-h--help-xl blueprint -hDisplays the help text for the blueprint command
-a--answers-xl blueprint -a /path/to/answers.yamlWhen provided, values within the answers file will be used as parameter inputs. By default strict mode is off so any value that is not provided in the file will be asked to the user.
For more information, see Blueprint answers file.
-s--strict-answersfalsexl blueprint -sa /path/to/answers.yamlIf the strict flag is set, all parameters will be requested from the answers file and errors will be shown if one of them is not there.
If it is not set, existing answer values will be used from the answers file, and the remaining ones will be asked to the user.
-b--blueprint-xl blueprint -b aws/monolithLooks for the path relative to the current repository, and instead of asking the user which blueprint to use, it will directly fetch the specified blueprint from the repository, or give an error if the blueprint is not found in the repository.
-l--local-repo-xl blueprint -l ./templates/test -b my-blueprintLocal repository to use, bypassing the active repository. Can be used along with the -b flag to execute blueprints from your local filesystem without defining a repository for it.
-d--use-defaults-xl blueprint -dIf the flag is set, default fields in parameter definitions will be used as value fields. Thus the user will not be asked questions for a parameter if a default value is present.

Examples

The examples shown depend on the version of XL CLI you are using.

xl blueprint --blueprint-current-repository my-github -b path/to/remote/blueprint
xl blueprint -b /path/to/local/blueprint/dir
xl blueprint -b ../relative/path/to/local/blueprint/dir
note

For the first example, my-github must be listed in the XL CLI config file.

About Blueprint repositories

You have flexible options and considerations when managing one or more blueprint repositories. Your options depend on the version of the XL CLI you are using. See Managing blueprint repositories for more information.

xl generate Command

Use the xl generate command to generate a YAML file for existing configurations in Deploy or Release. You can use the generated specifications to extend or build your own specifications that can be executed directly using the XL CLI using the xl apply command.

See Work with the YAML format for Release and Work with the YAML format for Deploy for details on YAML file root fields, kind fields and spec section options.

Note that when using xl generate, there are two sub-commands for xl-deploy and xl-release. For example, if you want to generate xl-release configurations and templates inside a folder, you can use the following command:

xl generate xl-release --templates --configurations -p your/path/to/your/folder -f filename.yml

Important: There are limitations to the number of objects you can generate:

  • For Deploy, the generate operation is limited to 256 configuration items (CIs).
  • For Release, a reasonable limit (currently 32) to the number of templates you can generate is enforced.

Syntax

xl generate [product] [flag] [value]

Assistance with commands

The following flags will provide you with the available commands:

  • xl-deploy - deploy configuration generator
  • xl-release - release configuration generator

Use xl generate [command] --help for more information about a command.

Release generate-specific flags

FlagDescription
-a, --applicationsAdds all the system applications to the generated file.
-c, --configurationsAdds all the configurations to the generated file.
-d, --dashboardsAdds all the dashboards to the generated file.
--deliveryPatternsAdds all the delivery patterns to the generated file.
-e, --environmentsAdds all the system environments and environment reservations to the generated file.
-f, --file stringRequired. Path and filename where the generated YAML file will be stored.
-h, --helpHelp for the generate command.
-n, --name stringServer entity name which will be used for definitions generation. **Example**: ./xl generate xl-release --templates -f templates.yml -o --name "*template_test_0?
-o, --overrideSet to true to overwrite an existing YAML file with the same name in the target directory.
-p, --path stringServer folder path which will be used for definitions generation. Leave empty to generate all global and folder entities. Use / to generate exclusively global entities.
-m, --permissionsAdds all the permissions in the system including the task permissions to the generated file.
-k, --riskProfilesAdds all the profiles in the system to the generated file.
-r, --rolesAdds all the system's roles to the generated file.
-s, --secretsGenerates a file secrets.xlvals that contains all the passwords and other secret values in the system.
Note:
  • This requires admin permissions. For more information see Manage values in DevOps as Code.
  • The user passwords are not stored in the secrets.xlvals file when you use the -u flag.
-t, -templatesAdds all the system's templates to the generated file.
-u, --usersAdds all the users in the system to the generated file.
--settingsAdds all the general settings to the generated file.
--notificationsAdds all the email notification settings to the generated file.
-b, --variablesAdds all the variables in system to the generated file.
--calendarAdds all the blackout and special days from calendar to the generated file.
--defaultsInclude properties that have default values. This can be helpful if you are going to use the generated values on another system that may have different default values.
The --defaults flag will include default properties with empty values.
--triggersAdds all triggers in the system to the generated file.

Deploy generate-specific flags

FlagDescription
-d, --defaultsInclude properties that have default values. (Only works for Deploy). This can be helpful if you are going to use the generated values on another system that may have different default values.
The --defaults flag will include default properties with empty values.
-f, --file stringRequired. Path and filename where the generated YAML file will be stored.
-g, --globalPermissionsAdds all the system's global permissions to the generated file .
-h, --helpHelp for the generate command.
-o, --overrideSet to true to overwrite an existing YAML file with the same name in the target directory.
-p, --path stringRequired. Server path which will be generated.
-r, --rolesAdds all the system's roles to the generated file.
-s, --secretsGenerates a file secrets.xlvals that contains all the passwords and other secret values in the system.
Note:
  • This requires admin permissions. For more information see Manage values in DevOps as Code.
  • The user passwords are not stored in the secrets.xlvals file when you use the -u flag.
-u, --usersAdds all the users in the system to the generated file.

Global flags

FlagDescription
--blueprint-current-repository stringCurrent active blueprint repository name
--config stringConfig file (default: $HOME/.xebialabs/config.yaml)
-q --quietSuppress all output, except for errors
-v --verboseVerbose output
--xl-deploy-authmethod stringAuthentication method to access the Deploy server (default "http")
--xl-deploy-password stringPassword to access the Deploy server (default "admin")
--xl-deploy-url stringURL to access the Deploy server (default http://localhost:4516/)
--xl-deploy-username stringUsername to access the Deploy server (default "admin")
--xl-release-authmethod stringAuthentication method to access the Release server (default "http")
--xl-release-password stringPassword to access the Release server (default "admin")
--xl-release-url stringURL to access the Release server (default http://localhost:5516/)
--xl-release-username stringUsername to access the Release server (default "admin")

Examples

Deploy examples

xl generate xl-deploy -p Applications --defaults -f /tmp/applications.yaml
xl generate xl-deploy -p Applications/PetPortal/1.0 -f applications.yaml
xl generate xl-deploy -p Environments -f /tmp/env.yaml
xl generate xl-deploy -p Infrastructure -f /tmp/infra.yaml
xl generate xl-deploy -p Configuration -f /tmp/config.yaml

Release examples

xl generate xl-release -p Templates/MyTemplate -f template.yaml
xl generate xl-release -p Templates/MyTemplate -f /tmp/template.yaml

Important:

When generating Release items with -p that have / in the template or folder name, the / character will be interpreted as a directory path. For example to export a folder with a parent folder XL and the name Release1/Release2: xl generate xl-release -p "XL/Release1/Release2" -f exports.yml This will create an error on generating: Unexpected response: Folder with path [XL/Release1] was not found To avoid this issue, escape all slashes in template or folder names with \. Note that this should not include actual path separators in the name. For example: xl generate xl-release -p "XL/Release1\/Release2" -f exports.yml

If a template or folder with / in the name is included within a generated YAML file, the characters will automatically be escaped in the template body. For example:

---
apiVersion: xl-release/v1
kind: Templates
spec:
- directory: test\/xx\/zz
children:
- template: qq\/ww

xl license Command

You can display license information for the open source software used in the XL CLI using the xl license command.

Command-specific flags

FlagDescription
-h, --helpHelp for the version command

Examples

xl license

xl preview Command

You can use the xl preview command with YAML files of the following kind:

  • Deployment kind: Preview the deployment plan by running the xl apply command.
  • Release kind: Preview the release phases and tasks by running the xl apply command.
  • StitchPreview kind: Preview the stitch transformations by running the xl apply command.

In all cases, the xl preview command will not execute any actions. It will simply provide output that details the actions the xl apply command will take, enabling you to inspect the actions and make adjustments to the YAML if needed before applying.

Command-specific flags

FlagDescription
-f, --file stringarrayRequired. Path(s) to the file(s) to preview
-h, --helpHelp for the preview command
--values stringToStringValues (default [])

Examples

xl preview -f deploy-myapp.yaml

xl version Command

You can display version information for the XL CLI using the xl version command.

Command-specific flags

FlagDescription
-h, --helpHelp for the version command

Examples

xl version

xl wrapper Command

You can use the xl wrapper command to generate wrapper scripts to bootstrap the XL CLI commands on your Continuous Integration (CI) servers without having to install the XL CLI executable itself. See Use a wrapper script for details.

Syntax

xl wrapper

Flags

FlagDescription
-h, --helpHelp for the wrapper command

Examples

xl wrapper
xl wrapper -v

Global flags

You can use global flags within all XL CLI commands to pass config file detail, credentials, and server URLs. You can also use global flags to control verbosity of the output.

The available global flags depend on the XL CLI version you are using.

FlagDescription
--blueprint-current-repository stringCurrent active blueprint repository name
--config stringConfig file (default $HOME/.xebialabs/config.yaml)
-h, --helpHelp for the XL CLI
-q, --quietSuppress all output, except for errors
-v, --verboseProvide verbose output
--xl-deploy-authmethod stringAuthentication method to access the Deploy server (default http)
--xl-deploy-password stringPassword to access the Deploy server (default admin)
--xl-deploy-url stringURL to access the Deploy server. Default: http://localhost:4516/
--xl-deploy-username stringUsername to access the Deploy server (default admin)
--xl-release-authmethod stringAuthentication method to access the Release server (default http)
--xl-release-password stringPassword to access the Release server (default admin)
--xl-release-url stringURL to access the Release server (default: http://localhost:5516/)
--xl-release-username stringUsername to access the Release server (default admin)

xl up Command

The xl up global flags can be viewed by entering xl up --help:

Flags

FlagDescription
--advanced-setupEnter the advanced setup
-a, --answers stringThe file containing answers for the questions
-b, --blueprint stringThe folder containing the blueprint to use. This can be a folder path relative to the remote blueprint repository, or a local folder path.
-h, --helpHelp for xl up
-l, --local stringEnable local file mode; by default remote file mode is used
--no-cleanupLeave generated files on the filesystem
--quick-setupQuickly run setup with all default values
--rolling-updatePerform rolling updates for Release and Deploy.For more information, see rolling updates
--cleanupUndeploy the deployed resources

Global flags

FlagDescription
--blueprint-current-repository stringCurrent active blueprint repository name
--config stringConfig file (default: $HOME/.xebialabs/config.yaml)
-q, --quietSuppress all output, except for errors
-v, --verboseVerbose output
--xl-deploy-authmethod stringAuthentication method to access the Deploy server (default "http")
--xl-deploy-password stringPassword to access the Deploy server (default "admin")
--xl-deploy-url stringURL to access the Deploy server (default http://localhost:4516/)
--xl-deploy-username stringUsername to access the Deploy server (default "admin")
--xl-release-authmethod stringAuthentication method to access the Release server (default "http")
--xl-release-password stringURL to access the Release server (default "admin")
--xl-release-url stringURL to access the Release server (default http://localhost:5516/)
--xl-release-username stringUsername to access the Release server (default "admin")

xl kube Command

See xl kube Command Reference.