Skip to main content

The cloud deployment command

Abstract

Reference for the Sitecore CLI cloud deployment command for managing XM Cloud deployment entities.

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

You can use the cloud deployment command as follows:

dotnet sitecore cloud deployment [subcommand] [options] 

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.

  • 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.

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

You can use the following options with the create subcommand:

Option

Description

--environment-id, -id

Required.

Unique identifier of the environment used when establishing a connection.

--upload, -u

If specified, the process uploads the current solution.

--working-dir, -dir

If specified, the process treats the path as the current solution.

Default: current solution path.

--no-watch

Hides the status/progress information during the deployment process. When the deployment finishes, the command instantly detaches.

--no-start

Prevents the deployment from starting.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display developer help and usage information about the command.

--waitForPostActions

When used, the deployment PostActions status/progress information displays in real-time in the CLI.

For example:

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

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

You can use the following options with the get subcommand:

Option

Description

--deployment-id, -id

Required.

The unique identifier of the deployment.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display developer help and usage information about the command.

For example:

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

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

You can use the following options with the list subcommand:

Option

Description

--environment-id, -id

Required.

The unique identifier of the environment.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display developer help and usage information about the command.

For example:

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

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

You can use the following options with the start subcommand:

Option

Description

--deployment-id, -id

Required.

The unique identifier of the deployment to start.

--no-watch

Hides the status/progress information during the deployment process. When the deployment finishes, the command instantly detaches.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display developer help and usage information about the command.

--waitForPostActions

When used, the deployment PostActions status/progress information displays in real-time in the CLI.

For example:

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

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

You can use the following options with the watch subcommand:

Option

Description

--deployment-id, -id

Required.

The unique identifier of the deployment to watch.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display developer help and usage information about the command.

--waitForPostActions

When used, the deployment PostActions status/progress information displays in real-time in the CLI.

For example:

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

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

You can use the following options with the log subcommand:

Option

Description

--deployment-id, -id

Required.

The unique identifier of the deployment to watch.

--output, -o

The 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, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display developer help and usage information about the command.

For example:

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