SaaS CMS has officially launched! Learn more now.

Deploying code to DXP for CMS 12... how?



For our current CMS-11 environment, deployment has always been done using Visual Studio + Web Deploy.  For our new CMS-12 environment, Opti support stated:

The only supported deployment method is using the deployment API as outlined in the documentation


  • Is the above Opti support statement accurate?
  • Can I deploy using Docker from VS?
  • Are there specific access levels/roles needed in DXP for deployment? (Docker failed for me)
  • Are all CMS-12 DXP environments Linux based?
  • Can someone point to or provide examples with detailed steps for deployment to DXP?


I have searched for and read a lot of documentation and I am not seeing or recognizing what to do.  All Opti-based documents I have found presumes a base familiarity I am missing.

From the post: ... any comments on these deployment options?

Any help or discussion would be greatly appreciated!

Thanks, Kevin

Jul 27, 2023 17:53

Hi Kevin

For a variety of reasons, the recommended way is to use a CI/CD platform, like TeamCity or Azure DevOps. One reason is to avoid repeat manual deployment work.

But, if you are okay with manual deployment, you can do the same procedure as the CI/CD platform would do. Take a look at this documentation page. It sounds like you are already on step 3.

Jul 27, 2023 20:06

Hi Kevin

I believe all new DXP environments are provisioned with the Linux stack.

About deploying to DXP with a Docker image. Not possible, since DXP creates its own container image from your package on deployment.

But you can deploy to Docker or Kubernetes, if you have your own such environment. It is exciting times.

Jul 27, 2023 20:17

Yes, the infrastructure and setup is different as CMS 12 is .NET Core and runs on Linux infrastructure.

  • No you can't deploy your own docker instance. You can only deploy by creating a versioned package file as per and deploying that to the PASS portal. This is done usually by the EpiCloud powershell scripts (personally we have it all plugged in to Azure DevOps CI/CD to build the package and push it then deploy it to Inte/Prep/Prod
  • There's no roles. When you have access to the PASS Portal you can grab the deployment API keys and use them for deploying the package.
  • On the DXP as mentioned it's all .NET Core on Linux (Under the covers the deployment system pushes code in to a docker contain itself as part of the deployment)

Here's a some guides on deploying in Azure DevOps

Push esentially it's

  1. Build your solution
  2. Push it in to a zip archive in a specific format and rename to a version nuget package (as linked above for format)
  3. Use the EpiCloud powershell to
    1. Push the package up to the pass portal
    2. Deploy said package to any of the environments
Jul 27, 2023 21:44

Hi Kevin,

Yes, If you are deploying to a DXP environment then the API is the only way to do it.

You can read more on how to deploy using the API here.

While this is all done from a local environment I would advise to use some form of CI/CD software to handle building and deploying the code for you there is a good write up here from the team at Epinova on how to do this using their tool.


Jul 28, 2023 8:22

Thank you all!

I've made some progress, but not full success.  I want to eventually end up with a CI/CD solution, but first I wanted to try deploying just with Powershell.

First, I use Visual Studio's Publish to Folder.

Then I run the following script:

Compress-Archive -Path ".\bin\Release\net6.0\publish\*" -DestinationPath ".\bin\Release\" -Force
if (Test-Path ".\bin\Release\") {
    Remove-Item ".\bin\Release\" -Force
Rename-Item -Path ".\bin\Release\" -NewName ".\bin\Release\" -Force

Connect-EpiCloud -ClientKey "<clientKey>" -ClientSecret  "<clientSecret>" -ProjectId "<projectId>"
$saslink = Get-EpiDeploymentPackageLocation
Add-EpiDeploymentPackage -SasUrl $saslink -Path ".\bin\Release\"
Start-EpiDeployment -DeploymentPackage "" -TargetEnvironment Integration -DirectDeploy
Complete-EpiDeployment -Id "<projectId>"

All of these steps appear to complete successfully, except the last one; resulting in the error:

API call failed! The error was: The remote server returned an error: (404) Not Found. {"success":false,"errors":["The deployment: xxxxxx is not found."],"result":null}
At C:\Program Files\WindowsPowerShell\Modules\EpiCloud\1.2.0\EpiCloud.psm1:315 char:13

Based on what I've read, the -Id parameter is not looking for a projectId, but some other ID.  What is this ID and where can I find it?

Otherwise, is my script complete and correct?

Jul 31, 2023 19:35

Hi Kevin

That parameter should refer to the specific deployment you have started.

As I recall you will get an object from Start-EpiDeployment which you can use in Complete-EpiDeployment. Something like:

$deployment = Start-EpiDeployment -DeploymentPackage "" -TargetEnvironment Integration -DirectDeploy
Complete-EpiDeployment -Id $
Jul 31, 2023 19:57
Kevin Gainey - Aug 01, 2023 13:54
Stefan, thanks for the tip. My site is up and running now. But when trying to run Complete-EpiDeployment, I now get a different error:

API call failed! The error was: The remote server returned an error: (400) Bad Request. The code deployment with id: xxxxx is not in verification state and cannot be completed.

Any ideas?
Stefan Holm Olsen - Aug 01, 2023 16:35
Aha, I forgot that you deploy to Integration. Then you should not even need to complete the deployment, as there is no verification step there. Simply skip that call and see if it works.
Kevin Gainey - Aug 01, 2023 16:37
Thanks Stefan!
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.