Aras DevOps

Example: Define an environment-specific login screen

This section illustrates how to create two SIT Deployments with different configurations. For each Deployment, different login screen background images will be created.

The following steps outline the process of creating different login screen background images:

  1. Add a Transformation that adds custom Variable to a configuration file. The following is an example of a Transformation that sets the ${imagePath} value in the BackgroundImageUrl property. This should be added to the TransformationsOfConfigFiles/OAuthServer/OAuthServer.config folder:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    <appSettings>
        <add key="BackgroundImageUrl" xdt:Locator="Match(key)" xdt:Transform="SetAttributes(value)" value="${imagePath}"/>
    </appSettings>
</configuration>

New background images should be added to the CodeTree/OAuthServer/wwwroot/images folder.

  1. Commit the Transformation and images and push them to Work Repository in Azure DevOps.
  1. Next, set the values for Variables for each Environment. By default, the project has the following five Variable Groups defined for custom configurations:

  1. Select CustomConfigValues-SIT Variable Group.

  1. Add a Variable with the Name imagePath and the Value ~/images/loginBackground1.jpg

  1. Run ContinuousIntegration Pipeline.
  2. Run Deploy Pipeline with default parameters using the Continuous Integration from step 6 as a Resource.

This Pipeline creates a new Deployment using the CustomConfigValues-SIT Variable Group for custom configuration. The BackgroundImageUrl Value will be set to the Value of imagePath from the Variable Group as defined in the Transformation.

Environment-specific Variables from the CustomConfigValues-SIT Variable Group are always applied by Deploy Aras Innovator Pipelines during initial Deployment or Redeployment.

  1. Visit the Deployed Aras Innovator to verify the change in the background image on the Login page.

To create another Deployment using another configuration of the image path, modify the default Variable Group (CustomConfigValues-SIT) or create a new Variable Group for the second Deployment.

The following is the example of deployment with a new Variable Group with my-custom-group Name:

  • In Azure DevOps, select Library and click + Variablegroup to create a new Variable Group.
  • Set the name to my-custom-group.
  • Add the imagePath Variable and set the path to the second image as the Value (~/images/loginBackground2.jpg).

  • Run Deploy Pipeline again with the new Variable group name set as the parameter.

  • Go to the deployed Aras Innovator to check that the background image on the Login page has changed.