Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

epi deployment start command

Starts a code deployment for the specified project.

Usage

epi deployment start [OPTIONS] --project <PROJECT> --target-environment <TARGET_ENVIRONMENT>

Examples

Deploy a package to the Integration environment:

epi deployment start \
  --project my-project \
  --deployment-package my-project.cms.app.1.0.0.nupkg \
  --env Integration \
  --direct-deploy true \
  --use-maintainance-page true \
  --wait true \
  --show-progress true

Promote deployment package and content from Integration to Preproduction environment, including database and blob storage:

epi deployment start \
  -p my-project \
  --source-app cms \
  --source-environment Integration \
  --include-blob true \
  --include-db true \
  --target-environment Preproduction \
  --wait true \
  --show-progress true

Options

-p, –project <PROJECT>

The project name.
Aliases: name.

–source-app <SOURCE_APP>

The source app(s) for the deployment (if no uploaded code package should be used).
Example: --source-app cms --source-app commerce.
Possible values: cms, commerce.

–source-environment <SOURCE_ENVIRONMENT>

The source environment for the deployment (if no uploaded code package should be used).
Possible values: integration, preproduction, production, ade1, ade2.

–deployment-package <DEPLOYMENT_PACKAGE>

The code package(s) being deployed.
Example: --deployment-package cms.app.1.0.0.nupkg --deployment-package cms.sqldb.1.bacpac.
Aliases: package.

–use-maintainance-page <USE_MAINTAINANCE_PAGE>

The flag to tell whether maintenance page is used during the deployment.
Default: false.
Possible values: true, false.

–zero-downtime-mode <ZERO_DOWNTIME_MODE>

What database mode to use on the primary web app.
If omitted, zero downtime mode will not be used.
Aliases: zero-down-time-mode.
Possible values: none, read-only, read-write, not-applicable.

–include-db <INCLUDE_DB>

Specify this switch to include the SQL DB from the source environment.
Default: false.
Possible values: true, false.

–include-blob <INCLUDE_BLOB>

Specify this switch to include blobs from the source environment.
Default: false.
Possible values: true, false.

–target-environment <TARGET_ENVIRONMENT>

The target environment to which the code should be deployed.
Aliases: target, env.
Possible values: integration, preproduction, production, ade1, ade2.

–direct-deploy <DIRECT_DEPLOY>

Specify this switch to speed up deployments to Integration/Development environment.
A deployment will be made directly to the target web app without performing a swap.
Attention: Resetting the deployment (or the database of the target environment) is not supported for DirectDeploy.
Default: false.
Possible values: true, false.

–wait <WAIT>

Specify this switch to enable “polling” of the deployment until it’s completed.
Default: false.
Possible values: true, false.

–show-progress <SHOW_PROGRESS>

Specify this switch to enable a progress bar indicating deployment progress.
Default: false.
Possible values: true, false.

–wait-timeout-minutes <WAIT_TIMEOUT_MINUTES>

The maximum amount of time, in minutes, to wait for the deployment to finish.
Default: 240.

–polling-interval-secconds <POLLING_INTERVAL_SECCONDS>

How often, in seconds, to poll for deployment status.
Default: 30.
Aliases: polling-interval-sec.

Specify this switch to validate the target site after the deployment.
Possible values: true, false.

The default validation link(s) to use if no validation link is provided in the deployment result.
Example: --validation-default-link https://www.example.com --validation-default-link https://www.example2.com.
Note: these links will be ignored if DXP returns a validation link in the deployment result.

–validation-delay-seconds <VALIDATION_DELAY_SECONDS>

The maximum amount of time, in seconds, to wait for the validation to start.
Default: 10.

–validation-timeout-minutes <VALIDATION_TIMEOUT_MINUTES>

The maximum amount of time, in minutes, to wait for the validation to finish.
Default: 5.

–notification-type <NOTIFICATION_TYPE>

The notification type.
Aliases: type.

–notification-id <NOTIFICATION_ID>

The notification id.

–notification-channel <NOTIFICATION_CHANNEL>

The notification channel to send the notification to.

–notification-salt <NOTIFICATION_SALT>

The notification channel salt.

–notification-env <NOTIFICATION_ENV>

The environment name or ID.

–notification-branch <NOTIFICATION_BRANCH>

The branch name.

–notification-requested-for <NOTIFICATION_REQUESTED_FOR>

The user who requested the deployment.

–notification-run-url <NOTIFICATION_RUN_URL>

The pipeline run URL.

–notification-run-id <NOTIFICATION_RUN_ID>

The pipeline run ID.

–notification-run-attempt <NOTIFICATION_RUN_ATTEMPT>

The pipeline run attempt.

–notification-job-id <NOTIFICATION_JOB_ID>

The pipeline job ID.

–last-message <LAST_MESSAGE>

The encrypted message of the last notification.
Used to update the last notification in the specified channel, instead of creating a new one.

-h, –help

Print help.

Remarks

When the deployment completes successfully, the CLI returns the deployment results in JSON format. Below is an example of the output structure for a successful deployment:

{
  "id": "caa3cfb8-741f-48d8-8658-4b36b3dae1bc",
  "projectId": "f8e8e7cf-e08f-46b1-9fdd-38942681d80f",
  "status": "AwaitingVerification",
  "percentComplete": 100.0,
  "validationLinks": [
    "http://sample-link.dxcloud.episerver.net/"
  ],
  "deploymentWarnings": [],
  "deploymentErrors": [],
  "parameters": {
    "targetEnvironment": "Integration",
    "maintenancePage": false,
    "zeroDowntimeMode": "NotApplicable",
    "packages": [
      "my-project.cms.app.1.0.0.nupkg"
    ]
  }
}

The id field is particularly important as it can be referenced in other deployment commands, such as complete or reset.

In case of error, the output will looks like below:

{
  "errors": [
    "Can not use DirectDeploy to Integration as there is already an on-going code deployment."
  ],
  "result": null,
  "success": false
}