Loading...
Area: Episerver B2B Commerce

B2B Commerce Cloud deployment process

Recommended reading 

The following describes how to retrieve versions of Epi B2B Commerce Cloud from the Episerver GitHub repository as well as making changes and deploying those changes to the Episerver hosting environment.

Prior to completing these steps please be sure to review and complete any appropriate pre-requisites from the following two articles:

  • Preparing for an Epi B2B Commerce Cloud Project
  • Epi B2B Commerce Cloud Environment Developer Setup

Each of the steps in this article reference a step in the following process, which is also referred to in the Epi B2B Commerce Cloud Infrastructure Deployment article.

Update Local Sandbox to Latest Version

It is important to work with the latest sandbox version. Production branch should always mirror what is currently deployed to the live site. It is possible to use selective merging when testing of specific Epi B2B Commerce Cloud versions is necessary.

Git Fetch will retrieve all of the commits in the upstream repository. This will not change local repository files but makes them available to the developer. Git Pull is a combination of a fetch and merge to current version.

For example, retrieve the latest versions and update the local repository:

  1. git checkout Sandbox
  2. git fetch upstream --tags
  3. git merge 4.3.2.12345

Add or Update Files

  1. Open git bash or command line
  2. git checkout sandbox
  3. Make any changes to the projects

However, when you make changes within your Extensions project, there is one extra step you must take after building your project and solution. The Extensions.dll file that is produced from the build, must be placed inside the /dist directory found in your local copy of Epi B2B Commerce. This is the directory that will be searched in order to find server-side extensions. The Extensions.dll file will be deployed to your sandbox environment by an internal Episerver process. A Powershell script is included in the /dist directory that will build your Extensions project in Release mode and copy the Extensions.dll to the appropriate place for deployment. You can have Visual Studio execute the Powershell script automatically with a build script. Copy the following script and use it as a post-build script for the Extensions project.

powershell.exe -command "& { $(SolutionDir)..\dist\buildExtensions.ps1 }"

Add Files to Sandbox Branch

Add all of the (changed) files to the sandbox branch. Commit all the changes of the sandbox branch to the local git repository.

  1. git add -all
  2. git commit -m "First commit"

Push the Sandbox Brand to Epi B2B Commerce Cloud

The process to push changes to sandbox is the same for production except the changes are not automatically applied in production. If a branch doesn't exist on the remote repository it will be created upon executing the git push command.

  1. Open git bash or command line
  2. git checkout sandbox
  3. git push -u origin sandbox

Configure the Website to Use the Theme

In the Epi B2B Commerce Cloud Admin Console configure the website to use the newly configured theme.

  1. Navigate and log into the [projectidentifier].insitesandbox.com/admin
  2. Navigate to Websites and Edit the website
  3. Configure the Theme drop down and select the desired theme.

The Site is Live

  1. Navigate to the [projectidentifier].insitesandbox.com URL and review the website.

Related Articles

Do you find this information helpful? Please log in to provide feedback.

Last updated: Dec 11, 2020

Recommended reading