Upgrading this solution refers to syncing with the xmcloud-foundation-head repository. This must be done periodically to be able to use new or updated XM Cloud features.
- Date: April 26th, 2023
- Commit link: https://github.com/sitecorelabs/xmcloud-foundation-head/tree/b83ddc9c42b40eeac1cedb09d036a3dca4784c75
- Open the commit link of the last sync.
- Above the files list, click the
<> Code
dropdown, then "Download ZIP". - Above the files list, click the branch selector dropdown, then select "main".
- Above the files list, click the
<> Code
dropdown, then "Download ZIP". - Unzip both downloaded archives to separate folders.
- Compare both folders using a file/folder comparison tool and review the changes introduced since the last sync.
- Change the date of the Last sync to today's date.
- Open the xmcloud-foundation-head main branch commit history.
- Next to the most recent commit, click the
<>
(Browse the repository at this point in the history) button. - Copy the page URL.
- Update the Last sync commit link for the next time we will sync.
This solution has some major changes compared to the xmcloud-foundation-head repository. Here is a list of changes and additions that could not be documented with DEMO TEAM CUSTOMIZATION
comments. Keep them in mind when syncing.
- Added
\.vscode\extensions.json
files. - API key generation vs hardcoded:
- We do not want to create an API key item from a template. Our API key item is hardcoded, serialized, and committed.
- In
\docker\build\cm
, removed the\templates
folder andreadme.md
file.
- Use of a solution container
- The xmcloud-foundation-head starter kit requires manually building and publishing the Visual Studio project to have the assemblies and configuration files deployed in the Docker development environment. Because we rarely change the Visual Studio solution files, we prefer to automate this step when building the Docker images.
- Added a
solution
container using the rootDockerfile
file. - Added the
\docker\build\cm\Data
folder. - Modified the
\docker\build\cm\Dockerfile
file.
- Extra files in
\docker
:build-and-push-images.yml
ensure-running-containers.ps1
version.yml
- Item serialization
- Serialize all the rendering hosts (
RenderingHosts
) instead of only the default rendering host (DefaultRenderingHost
). - Many extra paths are serialized.
- Serialize all the rendering hosts (
- Visual Studio solution and projects
- Renamed the solution file from
XmXlousSXAStarter.sln
toSitecore.DemoEdge.Website.sln
. - Our Platform project contains extra C# classes, configuration files, XDTs, and more.
- We have an extra Foundation\BranchPresets project.
- Renamed the solution file from
\src\icons
folder- We store our components source icons.
sitecore.json
contains a list of fields excluded from serialization.xmcloud.build.json
customizations:- Renamed the rendering host from
xmcloudpreview
toplaywebsite
, changed its path, and JSS deployment secret. - Added transforms.
- Added pages to the warmUpCm post action.
- Added index names to the populateSchema and reindex post actions.
- Added a publish post action.
- Renamed the rendering host from
- We have extra folders and files:
\docs
\tools
clean.ps1
Dockerfile
GitVersion.yml
init-ci.ps1
LICENSE
play_demo_thumbnail_100x100.png
pre-pr-updates.ps1
release-notes-templates.hb
serpull.ps1
serpush.ps1
- Rendering host project
- Renamed the
sxastarter
rendering host project torendering
. - Removed the SXA starter assets
\src\Navigation.tsx
- We use different modules:
- Tailwind instead of SASS.
- Removed
\src\assets\basic
\src\assets\sass
\src\assets\app.css
\src\assets\main.css
\src\lib\next-config\plugins\sass.js
- Added
\src\assets\css
.
- Removed
- PostCSS
- Stylelint
- Fortawesome instead of font-awesome
- auth0
- @next/bundle-analyzer
- OrderCloud
- Sitecore Discover
- Redux
- Storybook
- And many others...
- Tailwind instead of SASS.
- We have extra folders and files:
\.storybook
\discover-feeds
\search-crawlers
\sitecore
.editorconfig
.npmrc
postcss.config.js
robots.txt
to disallow public search engine indexing.scjssconfig.json
stylelint.config.ts
tailwind.config.js
vercel.json
\public\assets
\public\robots.txt
to disallow public search engine indexing.- Many subfolders in
\src\pages
\src\pages\_document.tsx
- Many subfolders in
\src\pages\api
- Many subfolders in
\src
- Custom
rootPlaceholders
inpackage.json
. .prettierignore
contains an extra entries:src/temp/categoriesData.ts
tsconfig.json
contains changes:- Extra
"strictNullChecks": false,
compiler option.
- Extra
- Moved the
\src\components
files into the\src\components\nextjs-sxa
folder.
- Renamed the
- Using a folder compare tool, compare the xmcloud-foundation-head main branch head folder with this repository.
- Merge changes into this repository.
- Make sure to keep the
DEMO TEAM CUSTOMIZATION
andEND CUSTOMIZATION
comments when necessary, remove those that are already covered by the latest xmcloud-foundation-head repository code, and add comments where needed. - Update this document as needed.
- Make sure to keep the
- Check whether the front-end solution lints correctly:
cd .\src\rendering
npm run lint
- Fix linting errors, if any.
- Run the TypeScript types validation:
npm run build:local
- Fix all TypeScript type validations.
- Check whether Storybook runs all the stories without error:
npm run storybook
- Fix Storybook errors
- Build the Docker images and start the containers:
cd ..\..
.\up.ps1
- Once the Docker environment is ready, test the website from the rendering container:
- Open https://www.xmcloudcm.localhost/
- Test most pages of the website.
- Ensure there are no new errors in the browser console, and rendering host logs.
- Test the Content Editor and Experience Editor:
- Ensure you can add, remove components, create new pages, etc.
- Ensure there are no new errors in the browser console, and CM logs.
- Fix easy to fix vulnerabilities:
npm audit
- Check if there are any vulnerabilities that are coming from our extra NPM packages (not from the starter kit package versions or from the JSS package) that can be fixed by updating our extra packages.
- Fix those vulnerabilities.
- Re-check whether the front-end solution lints correctly:
cd .\src\rendering
npm run lint
- Fix linting errors, if any.
- Commit, and push to your branch.
- Deploy your branch in an XM Cloud environment.
- Ensure your branch deploys successfully to XM Cloud.
- Fix problems, if any.
- Test on XM Cloud:
- Test the Pages editor.
- Test adding, deleting, modifying pages.
- Test adding, deleting, modifying components in pages.
- Test FEaaS components.
- Test switching to another language than English.
- Test embedded personalization.
- Test analytics.
- Test the Content Editor, Experience Editor
- Test the Pages editor.
- Create a pull request to the
develop
branch.