Deploy Resources to Multiple Brands
Purple Experience Builder
This article explains how the deployment of dynamic resources to multiple brands works in the Purple Experience, described using the Purple Experience Builder. If you have multiple brands in your portfolio and want to use the same logic and templates while varying logos, colours, etc., you can define one of your apps as a parent that will provide new features to its children. You define protected files for the apps that prevent overwriting files needed for the different look and feel of the child apps.
Deployment only affects the 'Preview' dynamic resources of the main and target apps, and you still have to manually copy the dynamic resources to 'Release' once you verify that the 'Preview' looks good.
Create or edit an existing builder.config.json inside the /default folder in Experience Builder, here is a basic example as well as a minimal and one with pipelines.
Legend to the above code
- mainAppId: The main app for this deployment. All non-brand-specific changes should be done to this app only!
- targetApps: The target apps this main app is deployed to (except the global and app-specific protected files)
- protectedFiles: Files to exclude from copying for all apps
When the preconditions are met there will be a new menu entry at the top right Hamburger Menu called Deploy to Target Apps
Clicking on Deploy to Target Apps opens a Dialog
- It shows a list of all Target Apps (they are links to the app)
- It also shows the current state of the deployment
You have the option to change the configuration file inside the dialog directly
When you start a deployment, the dialog shows the status of the current deployment on the current app as well as on any target apps (while the target app is not finished being deployed).
We currently don't support a deployment process for Release Versions of your Apps.
You have to manually download the dynamic resources from the preview app and upload it to the release app.
This can be done inside the Purple Manager > Select your App > 3 Dot Menu > Dynamic. Alternatively: Each App also has a quick link to the correct Purple Manager Page (seen below).
Q: I can't see the Deploy to Target Apps Menu entry. A: The builder.config.json is either misconfigured or doesn't exist. Please make sure that it does follow the JSON guidelines and does not have any trailing commas.
Q: When I open an App I see the Deployment Status Dialog and can't close it. A: This happens when a deployment is triggered from the Main App, while the deployment process is in progress. Your app will be available (the dialog does disappear by itself) as soon as your app is deployed.
Q: The Deployment Dialog didn't update for a while, what should I do? A: This can happen when the Experience Builder gets redeployed by a Developer due to a current bug. While being redeployed, the Deployment Data stored on the server can not be cleared. The Data does clear itself after 60 seconds which then will allow you to edit Apps again, but you have to refresh the page.
Q: I get the following message when I hover the Deploy to Target Apps entry: "This is a target app for a deployment, to make changes to the deployment config open the main app or change the mainAppId" A: This happens when you are inside of a target app and this message functions mainly as a quick link to the main app. If you are inside of the main app and get the message, then change the mainAppId inside the builder.config.json
Q: I get the following message when I hover the Deploy to Target Apps entry: "In your deployment config is the property mainAppId missing, add it to enable this menu entry" A: This message comes when the mainAppId inside the builder.config.json is missing, the property is used when the JSON is populated to the target apps to differentiate if this is the main app or a target app.
Q: I get the following message when I hover the Deploy to Target Apps entry: "In your deployment config are no target apps configured, add one to enable this menu entry" A: This message comes when the targetApps inside the builder.config.json is missing or empty. This basically means you have no apps to deploy to so no reason to enable the menu entry.