Deploy code changes

Overview

Sitefinity Cloud provides out-of-the-box Continuous Integration (CI) and Continuous Delivery (CD) processes that enable you to test and release new functionality at the click of a button. Releases can be easily traced and there is an interface for manual approval of deployment to specific environments. Moreover, in cases where the system fails to start after a package has been deployed, an automatic rollback is triggered to restore the system to the previously running state.

The following preconfigured CI/CD pipelines are available for the different applications that are part of the Sitefinity Cloud setup:

  • For ASP.NET Core Renderer : DotNetCoreRenderer.CI.CD

  • For Next.js Renderer : NextJsRenderer.CI.CD

  • For Sitefinity CMS : CI.CD

    NOTE: This pipeline is available if the Developer Extensions toggle is enabled.

  • For Sitefinity backend UI extensions : Extensions.CI.CD For more information, see Decoupled extensibility for your backend UI.

Develop code locally

By default, the deployment workflow is in line with the software development practice of Continuous Delivery (CD) for deploying new changes across environments. During this process, the deployment package is prepared from the main/master branch of the repository and is then subsequently deployed to each environment, following an approval/verification/testing step until reaching Production. By following these best practices, committing your changes directly to the main/master branch is restricted. Instead, all code development must be done in a dedicated feature branch, which you create from main/master branch, and then you merge your changes into main/master via pull request from the feature branch.

This flow can be customized according to the customer needs. For example, you may need a different branch or set of branches configured for each environment. The process of merging pull requests between branches will trigger a build and deploy to the environment of the target branch. In addition, you can configure deployments to any environment to be triggered manually.

The same is valid for the repositories of the ASP.NET Core Renderer, Next.js Renderer, and Sitefinity backend UI extensions applications.

Deploy your code

Once your feature branch with the desired code changes has been pushed to the origin, you can proceed by merging these changes to the main/master branch and deploying them.

Create a pull request to push your code to the main/master branch

Perform the following steps:

  1. Log in to your Sitefinity Cloud project Management Portal.
  2. Navigate to Repos » Pick the repository from the dropdown » Pull requests and click New pull request.
  3. From the source branch selection dropdown, select the feature branch you want to merge changes from. From the target branch selection dropdown, select main/master.
  4. Fill in the pull request details and click Create.

Approve and merge pull requests

Each pull request must be approved before merging the changes to the main/master branch. By default, all users who are in the Contributors role can approve pull requests. To view pull requests that are pending approval and approve them, follow these steps:

  1. In your Sitefinity Cloud Management Portal, navigate to Repos » Pick the repository from the dropdown » Pull requests and click the Active tab.
  2. Click the name of the desired pull request from the list.
  3. On the next screen, you can review the pull request and approve it by clicking Approve.

As a result, all policy requirements are marked as met and an automated CI build is triggered to test the changes against the main/master branch. To complete merging the changes, click Complete (located next to the Approvebutton).

NOTE: Once the merge is successfully completed, the feature branch is automatically deleted as it is no longer needed.

Approving a merge triggers an automated CI build and upon successful completion, the changes are merged in the main/master branch and a deployment is triggered to apply the changes on the corresponding non-Production environment(s). You can browse the non-Production environment(s) where the changes have been deployed to verify your newly deployed functionality is working as expected.

Promote your code to the Production environment

Once you have verified your code works as expected on the non-Production environment(s) you can promote it to the Production environment. By default, deploying to Production requires approval from a user with Promote to Production role. You can view deployments pending approval to Production, and promote them by following these steps:

  1. In your Sitefinity Cloud Management Portal, navigate to Pipelines » All.
  2. Select the CI/CD pipeline for the application.
  3. Locate the Run that is pending approval to Production and open it.
  4. Click Review next to the message 1 approval needs your review before this run can continue to Production.
  5. In the dialog box that opens, click Approve or Reject.

The non-Production environment(s) can also be configured to require approval from users in a Promote to {Environment Name} group.

NuGet package cache

NOTE: NuGet package cache is available only with the CI.CD pipeline for Sitefinity CMS application, if the Developer Extensions toggle is enabled.

The CI stage of the pipeline uses the built-in Azure DevOps Cache task to cache NuGet packages across builds.
For more information, see Azure DevOps documentation » Cache task.

This reduces the time it takes to execute the CI stage, because NuGet packages are downloaded from the cache, instead of restored from scratch on each run. The cache key is based on the contents of all packages.config files. This way, the cache is not being used in case packages change.

Preview deployment for Production

NOTE: Preview deployment tasks are available only with the CI.CD pipeline for Sitefinity CMS application, if the Developer Extensions toggle is enabled.

The preview deployment functionality checks that the newly deployed version of the application on Production can start up using a DB copy from Production before switching to the actual Production DB. This is important in case of DB schema changes and Sitefinity upgrades that come with the new deployment package, because if the application fails to start or corrupts the DB copy, the actual Production DB will not be affected.

Default configuration values

A set of default configuration values are applied to the Renderer application and Sitefinity CMS application when deployed to a Sitefinity Cloud environment, as specified in the respective tables below.

Sitefinity CMS application

Configuration PathValueCondition
System Default Settings
sf:enableFileSystemCacheDependencies"False"Developer Extensions toggle is enabled
sf:blockingOperationExecutionDelayInSeconds"20" Developer Extensions toggle is disabled
sf:AppStatusPageMode"Disabled"Always
sf:HealthCheckApiEndpoint"/restapi/health"Always
sf:HealthCheckUnhealthyStatusCode"500"Always
sf:lastCodeModifiedDateTimeInUTCDeployment time in UTCAlways
sf:serviceStackEnableFeatures"Json,Html"Always
sf-env:ValidationKeyEnvironment variableAlways
sf-env:DecryptionKeyEnvironment variableAlways
Warmup
sf-env:systemConfig/applicationModules/Warmup:startupType"Disabled"Developer Extensions toggle is enabled
Output Cache Settings
sf-env:outputCacheConfig:optionalHeaders"Status,Key"Always
sf-env:systemConfig/outputCacheSettings:defaultWebservicesProfile"Long Caching"Always
sf-env:systemConfig/outputCacheSettings/cacheProvidersSettings/redisSettings:ConnectionStringRedis connection stringEnvironment has distributed output cache
sf-env:systemConfig/outputCacheSettings:defaultOutputCacheProvider"Redis"Environment has distributed output cache
sf-env:systemConfig/outputCacheSettings/cacheService:authenticationKeyEnvironment variableAlways
sf-env:systemConfig/outputCacheSettings/cacheService:requireHttpsForAllRequests"False"Always
sf-env:systemConfig/outputCacheSettings/cacheService:enabled"True"Always
sf-env:systemConfig/outputCacheSettings/pageCacheInvalidation:cacheDependencyAggregationTreshold"300"Developer Extensions toggle is enabled
sf-env:systemConfig/outputCacheSettings:defaultClientProfile"Long Caching"Always
sf-env:systemConfig/outputCacheSettings:defaultDocumentProfile"Long Caching"Always
sf-env:systemConfig/outputCacheSettings:defaultProfile"Long Caching"Always
sf-env:systemConfig/outputCacheSettings:defaultVideoProfile"Long Caching"Always
sf-env:publishingConfig:feedsOutputCacheProfileName"RSS Feed Caching"Always
sf-env:systemConfig/outputCacheSettings/pageCacheInvalidation:maxParallelTasks"2"Always
sf-env:systemConfig/outputCacheSettings/pageCacheInvalidation:warmup"Light"Developer Extensions toggle is enabled
Health Check Service
sf-env:systemConfig/healthCheckConfig/healthChecks/NoBlockingOperations:enabled"True"Developer Extensions toggle is disabled
sf-env:systemConfig/healthCheckConfig/healthChecks/NoBlockingOperations:timeoutSeconds"30"Developer Extensions toggle is disabled
sf-env:systemConfig/healthCheckConfig/healthChecks/NoBlockingOperations:critical"True"Developer Extensions toggle is disabled
sf-env:systemConfig/healthCheckConfig:enabled"True"Always
sf-env:systemConfig/healthCheckConfig/healthChecks/Database access:enabled"True"Always
sf-env:systemConfig/healthCheckConfig/healthChecks/Database access:timeoutSeconds"30"Always
sf-env:systemConfig/healthCheckConfig/healthChecks/Database access:critical"True"Always
sf-env:systemConfig/healthCheckConfig/healthChecks/Redis:enabledVariableEnvironment has distributed output cache OR has NLB
sf-env:systemConfig/healthCheckConfig/healthChecks/Redis:timeoutSeconds"60"Environment has distributed output cache OR has NLB
sf-env:systemConfig/healthCheckConfig/healthChecks/Redis:critical"False"Environment has distributed output cache OR has NLB
sf-env:systemConfig/healthCheckConfig/healthChecks/Search service:enabledVariableEnvironment search service matches "AzureSearchService"
Packaging
sf-env:packagingConfig:packagingMode"Target"Developer Extensions toggle is enabled
Pages
sf-env:pagesConfig/errorPages:mode"Disabled"Developer Extensions toggle is disabled
Labels and Messages
sf-env:resourcesConfig:LabelsAndMessagesReadOnly"True"Developer Extensions toggle is enabled
Libraries
sf-env:librariesConfig:sizeOfChunk"5000000"Always (5MB chunks)
sf-env:librariesConfig/blobStorage/providers/AzureStorage:enableRelativeUrls"True"Always
sf-env:librariesConfig/blobStorage/providers/AzureStorage:cdn"/"Always
sf-env:librariesConfig/blobStorage/providers/AzureStorage:connectionStringAzure connection stringAlways
sf-env:librariesConfig/blobStorage/providers/AzureStorage:containerNameEnvironment variableAlways
sf-env:librariesConfig/blobStorage/providers/AzureStorage:enabled"True"Always
sf-env:librariesConfig/blobStorage/providers/AzureStorage:siteSyncBlobTransferEnabled"True"/"False""True" for Site Sync target environment
Load Balancing
sf-env:systemConfig/loadBalancingConfig/redisSettings:ConnectionStringRedis connection stringEnvironment has NLB
sf-env:systemConfig/loadBalancingConfig/redisSettings:KeyPrefixKey prefix with org/project/envEnvironment has NLB
Authentication - Common Settings
sf-env:authenticationConfig/securityTokenServiceSettings/authenticationProviders/{provider}:OpenIdConnectNonceModeEnabledAlways
sf-env:authenticationConfig/securityTokenServiceSettings/authenticationProviders/{provider}:authorityAzure AD authority URLAlways
sf-env:authenticationConfig/securityTokenServiceSettings/authenticationProviders/{provider}:autoAssignedRoles""Always
sf-env:authenticationConfig/securityTokenServiceSettings/authenticationProviders/{provider}:clientIdEnvironment variableAlways
sf-env:authenticationConfig/securityTokenServiceSettings/authenticationProviders/{provider}:enabled"True"Always
sf-env:authenticationConfig/securityTokenServiceSettings/authenticationProviders/{provider}:title"Log in with SSO"Always
Authentication - Response Type
sf-env:authenticationConfig/securityTokenServiceSettings/authenticationProviders/{provider}:responseType"id_token"Developer Extensions toggle is disabled
sf-env:authenticationConfig/securityTokenServiceSettings/authenticationProviders/{provider}:redirectUri"/Sitefinity/Authenticate/OpenID/signin-custom"Always
Authentication - Sitefinity Cloud Authentication
sf-env:sitefinityCloudAuthenticationConfig:OrganizationIdEnvironment variableAlways
sf-env:sitefinityCloudAuthenticationConfig:ProjectIdEnvironment variableAlways
sf-env:sitefinityCloudAuthenticationConfig:EnvironmentEnvironment nameAlways
sf-env:sitefinityCloudAuthenticationConfig:ClaimToRolesMappingIdentityProviderIdentity provider ("OpenIDConnect")Developer Extensions toggle enabled AND authentication package version >= 2.0.0
sf-env:sitefinityCloudAuthenticationConfig:ClaimToRolesMappingNamePrefix"SitefinityCloud_"Always
sf-env:sitefinityCloudAuthenticationConfig:SitefinityCloudApiBaseUrlEnvironment variableAlways
sf-env:sitefinityCloudAuthenticationConfig:AccessKeyIdEnvironment variableAlways
sf-env:sitefinityCloudAuthenticationConfig:AccessKeySecretEnvironment variableAlways
Licensing
sf-env:systemConfig/licensing:defaultLicenseProvider"AzureProvider"Developer Extensions toggle disabled
sf-env:systemConfig/licensing/licenseProviders/AzureProvider:providerTypeAzure license provider typeDeveloper Extensions toggle disabled
sf-env:systemConfig/licensing/licenseProviders/AzureProvider:clientIdEnvironment variableDeveloper Extensions toggle disabled
sf-env:systemConfig/licensing/licenseProviders/AzureProvider:clientSecretEnvironment variableDeveloper Extensions toggle disabled
sf-env:systemConfig/licensing/licenseProviders/AzureProvider:azureTenantEnvironment variableDeveloper Extensions toggle disabled
sf-env:systemConfig/licensing/licenseProviders/AzureProvider:keyVaultUrlEnvironment variableDeveloper Extensions toggle disabled
sf-env:systemConfig/licensing/licenseProviders/AzureProvider:name"AzureProvider"Developer Extensions toggle disabled
SSL Offloading
sf-env:systemConfig/sslOffloadingSettings:EnableSslOffloading"True"Developer Extensions toggle disabled
sf-env:systemConfig/sslOffloadingSettings:HttpHeaderFieldName"X-Forwarded-Proto"Developer Extensions toggle disabled
sf-env:systemConfig/sslOffloadingSettings:HttpHeaderFieldValue"https"Developer Extensions toggle disabled
Search
sf-env:searchConfig/searchServices/LuceneSearchService:luceneServiceIndexFolder"~/search"Always
sf-env:searchConfig/searchServices/AzureSearchService:azureSearchServiceNameEnvironment variableEnvironment search service matches "AzureSearchService"
sf-env:searchConfig/searchServices/AzureSearchService:azureServiceAdminKeyEnvironment variableEnvironment search service matches "AzureSearchService"
Site Sync
sf-env:systemConfig/applicationModules/Synchronization:startupType"OnApplicationStart"Sitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND (environment is site sync target OR has site sync target)
sf-env:siteSyncConfig:publishingSnapInSyncEnabled"True"Sitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND (environment is site sync target OR has site sync target)
sf-env:dataConfig:incrementalGuidRangeSite key valueSitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND site sync site key is not null
sf-env:siteSyncConfig:enabledAsTarget"True"Sitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND environment is site sync target
sf-env:siteSyncConfig:apiKeyEnvironment variableSitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND environment is site sync target AND Sitefinity version >= 15.1.8300
sf-env:siteSyncConfig/receivingServers/{targetServerId}:apiKeyEnvironment variableSitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target AND Sitefinity version >= 15.1.8300
sf-env:siteSyncConfig/receivingServers/{targetServerId}:userNameEnvironment variableSitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target AND Sitefinity version < 15.1.8300
sf-env:siteSyncConfig/receivingServers/{targetServerId}:passwordEnvironment variableSitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target AND Sitefinity version < 15.1.8300
sf-env:siteSyncConfig/receivingServers/{targetServerId}:serverAddressEnvironment variableSitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target
sf-env:siteSyncConfig/receivingServers/{targetServerId}:serverUserFriendlyNameProductionSitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target
sf-env:siteSyncConfig/dynamicFieldContainerSync:AllowStructureOnlySyncPropName"True"/"False"Sitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target (based on sync mode)
sf-env:siteSyncConfig/dynamicFieldContainerSync:AllowStructureAndDataSyncPropName"True"/"False"Sitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target (based on sync mode)
sf-env:siteSyncConfig/dynamicFieldContainerSync:AllowDataOnlySyncSyncPropName"True"/"False"Sitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target (based on sync mode)
sf-env:siteSyncConfig:disablePermissionsSync"False"Sitefinity modules contain "Telerik.Sitefinity.SiteSync.Impl" AND has site sync target
Audit Trail
sf-env:systemConfig/applicationModules/AuditTrail:startupType"OnApplicationStart"Sitefinity modules contain "Telerik.Sitefinity.AuditTrail" OR Developer Extensions toggle disabled
Image Optimization
sf:disableImageOptimization"True"/"False"Sitefinity modules contain "Progress.Sitefinity.ImageOptimization" AND image optimization is enabled
sf-env:imageOptimizationConfig:enableImageOptimization"True"Sitefinity modules contain "Progress.Sitefinity.ImageOptimization" AND image optimization is enabled
sf-env:imageOptimizationConfig:enableDetailLogging"True"Sitefinity modules contain "Progress.Sitefinity.ImageOptimization" AND image optimization is enabled
Service Hooks - Output Cache Invalidation
sf-env:systemConfig/applicationModules/ServiceHooksModule:startupType"OnApplicationStart"Always
sf-env:serviceHooksConfig/triggers/cb90ac17-d9cb-4C89-ba2e-fb09076388b2/actions/3e013be1-354D-47F5-ae52-3c3ddf7e6aaa:UrlCDN purge URL for output cacheAlways
sf-env:serviceHooksConfig/triggers/cb90ac17-d9cb-4C89-ba2e-fb09076388b2/actions/3e013be1-354D-47F5-ae52-3c3ddf7e6aaa:SecretEnvironment variableAlways
sf-env:serviceHooksConfig/triggers/cb90ac17-d9cb-4C89-ba2e-fb09076388b2/actions/3e013be1-354D-47F5-ae52-3c3ddf7e6aaa:HeadersJSON headers arrayAlways
Service Hooks - Document Changed
sf-env:serviceHooksConfig/triggers/c92e6cc2-359a-4fd9-85b4-de29d1146224/actions/f7110cd4-965e-43cb-bec8-12c45f278262:UrlCDN purge URL for mediaAlways
sf-env:serviceHooksConfig/triggers/c92e6cc2-359a-4fd9-85b4-de29d1146224/actions/f7110cd4-965e-43cb-bec8-12c45f278262:SecretEnvironment variableAlways
sf-env:serviceHooksConfig/triggers/c92e6cc2-359a-4fd9-85b4-de29d1146224/actions/f7110cd4-965e-43cb-bec8-12c45f278262:HeadersJSON headers arrayAlways
sf-env:serviceHooksConfig/triggers/c92e6cc2-359a-4fd9-85b4-de29d1146224/actions/f7110cd4-965e-43cb-bec8-12c45f278262:HeadersJSON headers array with environmentAlways
Service Hooks - Image Changed
sf-env:serviceHooksConfig/triggers/42e890f0-3e93-4b3b-8d01-b437db847360/actions/a2a55163-d029-410d-bb6f-60d06728b363:UrlCDN purge URL for mediaAlways
sf-env:serviceHooksConfig/triggers/42e890f0-3e93-4b3b-8d01-b437db847360/actions/a2a55163-d029-410d-bb6f-60d06728b363:SecretEnvironment variableAlways
sf-env:serviceHooksConfig/triggers/42e890f0-3e93-4b3b-8d01-b437db847360/actions/a2a55163-d029-410d-bb6f-60d06728b363:HeadersJSON headers arrayAlways
sf-env:serviceHooksConfig/triggers/42e890f0-3e93-4b3b-8d01-b437db847360/actions/a2a55163-d029-410d-bb6f-60d06728b363:HeadersJSON headers array with environmentAlways
Service Hooks - Video Changed
sf-env:serviceHooksConfig/triggers/607ea2f6-560a-4605-beeb-77f6223f149d/actions/1e1849d6-eb2c-42d9-9b36-a45a15fb4979:UrlCDN purge URL for mediaAlways
sf-env:serviceHooksConfig/triggers/607ea2f6-560a-4605-beeb-77f6223f149d/actions/1e1849d6-eb2c-42d9-9b36-a45a15fb4979:SecretEnvironment variableAlways
sf-env:serviceHooksConfig/triggers/607ea2f6-560a-4605-beeb-77f6223f149d/actions/1e1849d6-eb2c-42d9-9b36-a45a15fb4979:HeadersJSON headers arrayAlways
sf-env:serviceHooksConfig/triggers/607ea2f6-560a-4605-beeb-77f6223f149d/actions/1e1849d6-eb2c-42d9-9b36-a45a15fb4979:HeadersJSON headers array with environmentAlways
Integration Hub
sf-env:systemConfig/applicationModules/IntegrationHub:startupType"OnApplicationStart"Sitefinity modules contain "Progress.Sitefinity.IntegrationHub" OR Developer Extensions toggle disabled
Admin App Extensions
sf-env:adminAppExtensionsConfig:featureEnabled"True"Sitefinity version >= 15.2.8421
sf-env:adminAppExtensionsConfig:customFieldsEnabled"True"Sitefinity version >= 15.2.8421
sf-env:adminAppExtensionsConfig:rteEnabled"True"Sitefinity version >= 15.2.8421
Diagnostic Module
sf-env:systemConfig/applicationModules/Diagnostics:startupType"Disabled"Developer Extensions toggle enabled AND Sitefinity modules contain "Telerik.Sitefinity.Diagnostics"
Feather
sf-env:featherConfig:disablePrecompilation"False"Developer Extensions toggle enabled
sf-env:featherConfig:logPrecompiledViewUsage"False"Developer Extensions toggle enabled
sf:featherFileSystemWatcherBehaviour"True"Developer Extensions toggle enabled
AI Services
sf-env:systemConfig/applicationModules/AIServices:startupType"OnApplicationStart"Always
sf-env:aIServicesConfig:DefaultAIService"SitefinityAIClient"Sitefinity modules contain "Telerik.Sitefinity.AIServiceConnector" AND Sitefinity version >= 15.2.0000
sf-env:aIServicesConfig/AIServices/SitefinityAIClient:ApiKeyIdEnvironment variableSitefinity modules contain "Telerik.Sitefinity.AIServiceConnector" AND Sitefinity version >= 15.2.0000
sf-env:aIServicesConfig/AIServices/SitefinityAIClient:ApiKeyEnvironment variableSitefinity modules contain "Telerik.Sitefinity.AIServiceConnector" AND Sitefinity version >= 15.2.0000
sf-env:aIServicesConfig/AIServices/SitefinityAIClient:EndpointAPI endpoint URLSitefinity modules contain "Telerik.Sitefinity.AIServiceConnector" AND Sitefinity version >= 15.2.0000
AI Hybrid Search Services
sf:hybridSearch:EndpointAPI endpoint URLAI search enabled
sf:hybridSearch:ApiKeyIdEnvironment variable;AI search enabled
sf:hybridSearch:ApiKeyEnvironment variableAI search enabled
sf:hybridSearch:Indexes"backend-search"AI search enabled
sf:cloud:EnvironmentEnvironment nameAI search enabled
sf:cloud:OrganizationIdEnvironment variableAI search enabled
sf:cloud:ProjectIdEnvironment variable;AI search enabled
AI Assistant
sf-env:sitefinityAssistantConfig:connectionStringEnvironment variableAI assistant enabled
sf-env:sitefinityAssistantConfig:adminApiBaseUrlEnvironment variableAI assistant enabled
sf-env:sitefinityAssistantConfig:adminFrontendBaseUrlEnvironment variable with /ui/ suffixAI assistant enabled
sf-env:sitefinityAssistantConfig:featureState"enabled"AI assistant enabled
Sitefinity Insight
sf-env:digitalExperienceCloudConnectorConfig:accessKeyEnvironment variableAlways
sf-env:digitalExperienceCloudConnectorConfig:connected"True"Always
sf-env:digitalExperienceCloudConnectorConfig/siteToApiKeyMappings/{siteName}:dataCenterApiKeyEnvironment variableFor each site with Insight configured
sf-env:digitalExperienceCloudConnectorConfig/disableTracking"True"Has site sync target
Web Services
sf-env:webServicesConfig/Routes/Frontend/services/default:access"Anonymous"Always

ASP.NET Core Renderer application

Configuration PathValueCondition
System Default Settings
Sitefinity__UrlEnvironment variableAlways
Sitefinity__OutputCacheAuthKeyEnvironment variable Always
Sitefinity__OutputCacheDuration"0"Always
Sitefinity__WebServicePath"api/default"Always
Sitefinity__RemoteValidationKeyEnvironment variableEnvironment is not "Production"
SitefinityAssistant__CdnHostName"cdn.assistant.api.sitefinity.cloud"Always
SitefinityAssistant__AIServiceBaseUrlEnvironment variableAlways
SitefinityAssistant__AssistantsAdminApiBaseUrlEnvironment variableAlways
SitefinityAssistant__AIServiceAccessKeyIdEnvironment variableAlways
SitefinityAssistant__AIServiceAccessKeySecretEnvironment variableAlways

Next.js Renderer application

Configuration PathValueCondition
System Default Settings
SF_CMS_URLEnvironment variableAlways
SF_NEXTJS_SET_CACHE_CONTROL_METATAG"True"Always
SF_REMOTE_VALIDATION_KEYEnvironment variableEnvironment is not "Production"

Extend CI/CD pipelines with custom tasks

To facilitate the needs of customizing the CI/CD process, Sitefinity Cloud offers a mechanism for extending the existing CI.CD pipeline and include custom tasks for the following events:

  • Pre-build tasks in CI stage

  • Post-build tasks in CI stage

  • Post-deployment tasks in CD stage

    NOTE: Post-deployment tasks are available only for the CI.CD pipeline of Sitefinity CMS application, if Developer Extensions toggle is enabled.

Customize CI stage in CI.CD pipeline for Sitefinity CMS application

  1. Open the CICD.yaml file located in the repository of the respective application (Sitefinity CMS, ASP.NET Core, Next.js).
  2. Locate the parameters element for the extended YAML template.
  3. Add a new parameter of type stepList called preBuildSteps or postBuildSteps, and add tasks using the standard YAML task/step syntax.

The example below demonstrates custom pre-build steps installing and building frontend assets with npm, and post-build steps for running unit tests in the CI.CD pipeline for Sitefinity CMS application:

yaml

    extends:
      template: CICDTemplate.yaml@SitefinityCloudPipelines
      parameters:
        preBuildSteps:
        - task: Npm@1
          displayName: npm install
          inputs:
            workingDir: $(Build.Repository.LocalPath)\Frontend
            verbose: false
        - task: Npm@1
          displayName: npm custom
          inputs:
            command: custom
            workingDir: $(Build.Repository.LocalPath)\Frontend
            verbose: false
            customCommand: run deploy --verbose
        postBuildSteps:
        - task: VSTest@2
          displayName: 'Test Assemblies'
          inputs:
            testAssemblyVer2: |
              **\$(BuildConfiguration)\*test*.dll
              !**\obj\**
            searchFolder: '$(Build.Repository.LocalPath)'
            runTestsInIsolation: true
            codeCoverageEnabled: true
            testRunTitle: 'Default Test Run'
            platform: '$(BuildPlatform)'
            configuration: '$(BuildConfiguration)'
            diagnosticsEnabled: True

The example below demonstrates custom pre-build steps for adding custom NuGet sources and post-build steps for running unit tests in the DotNetCoreRenderer.CI.CD pipeline:

yaml

    extends:
       template: CICDDotNetCoreRendererTemplateV2.yaml@SitefinityCloudPipelines
       parameters:
         preBuildSteps:
         - task : NuGetAuthenticate@1
           inputs:
             forceReinstallCredentialProvider: true
         - task : DotNetCoreCLI@2
           displayName: Add NucleusNugetFeed
           inputs:
             command: custom
             custom: nuget
             arguments: 'add source https://pkgs.dev.azure.com/OrgName-SfCloud/SomeProjectName/_packaging/SomeProjectNameNugetFeed/nuget/v3/index.json -n SomeProjectNameNugetFeed'
             workingDirectory: '$(Build.Repository.LocalPath)'
         postBuildSteps:
         - task : VSTest@2
           displayName: 'Test Assemblies'
           inputs:
             testAssemblyVer2: |
               **\$(BuildConfiguration)\*test*.dll
               !**\obj\**
             searchFolder: '$(Build.Repository.LocalPath)'
             runTestsInIsolation: true
             codeCoverageEnabled: true
             testRunTitle: 'Default Test Run'
             platform: '$(BuildPlatform)'
             configuration: '$(BuildConfiguration)'
             diagnosticsEnabled: true

Customize CD stage in CI.CD pipeline for Sitefinity CMS application

NOTE: Post-deployment tasks are available only for the CI.CD pipeline of Sitefinity CMS application, if Developer Extensions toggle is enabled.

  1. Open the CICD.yaml file located in the repository of the Sitefinity project.
  2. Locate the parameters element for the extended CICDTemplate.yaml.
  3. Define environments collection and list the environments where CD stage needs to be customized.
  4. Add a new parameter of type stepList called postReleaseSteps as part of the environment object, and add tasks using the standard YAML task/step syntax.

The custom steps are defined per environment and only an allowed list of task types can be used. Currently the allowed task types are:

  • DownloadPipelineArtifact@2
  • VisualStudioTestPlatformInstaller@1
  • VSTest@2

The example below demonstrates a custom post-release task to run web tests, based on an artifact called tests:

yaml

    extends:
      template: CICDTemplate.yaml@SitefinityCloudPipelines
      parameters:
        environments:
        - name: 'Staging'
          postReleaseSteps:
          - task: DownloadPipelineArtifact@2
            displayName: 'Download tests'
            inputs:
              source: 'current'
              artifact: 'tests'
          - task: VisualStudioTestPlatformInstaller@1
            displayName: 'Visual Studio Test Platform Installer'
            inputs:
              versionSelector: 'latestStable'
          - task: VSTest@2
            displayName: 'VsTest - testAssemblies'
            inputs:
              testSelector: 'testAssemblies'
              testAssemblyVer2: |
                **\*test*.dll
                !**\*TestAdapter.dll
                !**\obj\**
              searchFolder: '$(Pipeline.Workspace)'
              runTestsInIsolation: true
              codeCoverageEnabled: true
              testRunTitle: 'Default Test Run'
              diagnosticsEnabled: true
              vsTestVersion: 'toolsInstaller'

Customize CD stage in CI.CD pipeline for ASP.NET Core / Next.js Renderer

NOTE: Post-deployment tasks are available only for the CI.CD pipeline of the ASP.NET Core / Next.js Renderer, if Developer Extensions toggle is enabled.

  1. Open the CICD.yaml file located in the repository of the Sitefinity project.
  2. Locate the parameters element for the extended CICDTemplate.yaml.
  3. Define environments collection and list the environments where CD stage needs to be customized.
  4. Add a new parameter of type stepList called postReleaseSteps as part of the environment object, and add tasks using the standard YAML task/step syntax.

The example below demonstrates a custom post-release task to notify upon deployment completion:

yaml

extends:
    template: CICDDotNetCoreRendererTemplateV2.yaml@SitefinityCloudPipelines
    parameters:
      postReleaseSteps:
        - task: PowerShell@2
          displayName: 'Send Test Deployment Notification'
          inputs:
            targetType: 'inline'
            pwsh: true
            script: |
              Write-Host "Deployment to $(Build.SourceBranchName) completed successfully"
              Write-Host "Build Number: $(Build.BuildNumber)"