1. The CLI cloud command

The cloud deployment command

The XM Cloud plugin for Sitecore CLI provides the cloud deployment command to help you manage deployment entities for your projects.

Important

The maximum supported repository size for deployments is 500MB. If your repository exceeds this limit, you won't be able to deploy your source code to SitecoreAI.

Usage

You can use the cloud deployment command as follows:

shell
dotnet sitecore cloud deployment [subcommand] [options]

Subcommands

You can use the following subcommands:

  • create - creates and starts deployment entities.
  • info - displays information about a deployment.
  • list - lists the most recent deployments for an environment or editing host.
  • start - starts the execution of a deployment.
  • watch - shows information about the status/progress of the deployment.
  • log - shows or downloads logs about a specific deployment.
  • cancel - cancels a specified XM Cloud Deployment that is in progress.

The create subcommand

The create subcommand creates and starts a deployment entity for an environment. You must specify the unique identifier of the environment.

You can use the following options with the create subcommand:

OptionDescription
--environment-id, -idRequired.Unique identifier of the environment used when establishing a connection.
--upload, -uIf specified, the process uploads the current solution.The --upload parameter ensures the Server-side rendering engine endpoint URL and Server-side rendering engine application URL fields are populated with the necessary values. Without these settings, the rendering host will be empty and fail to work with layout and page editors.
--working-dir, -dirIf specified, the process treats the path as the current solution.Default: current solution path.
--no-watchHides the status/progress information during the deployment process. When the deployment finishes, the command instantly detaches.
--no-startPrevents the deployment from starting.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.
--waitForPostActionsWhen used, the deployment PostActions status/progress information displays in real-time in the CLI.

For example:

shell
dotnet sitecore cloud deployment create --environment-id <id> --no-start --no-watch --upload --working-dir <path>

The info subcommand

The info subcommand provides information about a specific deployment entity. You must provide the unique identifier of the deployment.

You can use the following options with the get subcommand:

OptionDescription
--deployment-id, -idRequired.The unique identifier of the deployment.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.

For example:

shell
dotnet sitecore cloud deployment get --deployment-id <id>

The list subcommand

The list subcommand lists the most recent deployments for an environment or editing host. You must provide the unique identifier of the environment.

You can use the following options with the list subcommand:

OptionDescription
--environment-id, -idRequired.The unique identifier of the environment or editing host.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.

For example:

shell
dotnet sitecore cloud deployment list --environment-id <id>

The start subcommand

The start subcommand starts the execution of a deployment. You must provide the unique identifier of the deployment.

You can use the following options with the start subcommand:

OptionDescription
--deployment-id, -idRequired.The unique identifier of the deployment to start.
--no-watchHides the status/progress information during the deployment process. When the deployment finishes, the command instantly detaches.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.
--waitForPostActionsWhen used, the deployment PostActions status/progress information displays in real-time in the CLI.

For example:

shell
dotnet sitecore cloud deployment start --deployment-id <id> --no-watch

The watch subcommand

The watch subcommand shows information about the deployment status/progress.

You can use the following options with the watch subcommand:

OptionDescription
--deployment-id, -idRequired.The unique identifier of the deployment to watch.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.
--waitForPostActionsWhen used, the deployment PostActions status/progress information displays in real-time in the CLI.

For example:

shell
dotnet sitecore cloud deployment watch --deployment-id <id>

The log subcommand

The log subcommand shows or downloads logs about a specific deployment.

You can use the following options with the log subcommand:

OptionDescription
--deployment-id, -idRequired.The unique identifier of the deployment to watch.
--outputpath, -oThe output path for the file. If present, the logs do not show in the console but are downloaded to the file in the output destination.
--verbose, -vWrite additional information about the command.
--trace, -tWrite diagnostics and detailed information about the command.
-?, -h, --helpDisplay developer help and usage information about the command.

For example:

shell
dotnet sitecore cloud deployment log --deployment-id <id> --output <path>

The cancel subcommand

The cancel subcommand cancels a specified XM Cloud Deployment that is in progress.

You can use the following options with the cancel subcommand:

OptionDescription
--deployment-idĀ , -idRequired.The unique identifier for an XM Cloud Deployment.
-vWrite some additional diagnostic and performance data.
-tWrite some additional diagnostic and performance data.
--configĀ Path to root sitecore.json directory (default: cwd).
-?, -h, --helpShow help and usage information.
If you have suggestions for improving this article, let us know!