Use an external source code repository

Overview

By default, each application in your Sitefinity Cloud project is built from a repository that Sitefinity Cloud provisions inside the project, which you work with under Repos in the Management Portal.

If your organization keeps its source code somewhere else, for example in GitHub or a different Azure DevOps organization, you can keep that external repository as the single source of truth and have Sitefinity Cloud build directly from it. This avoids maintaining a copy of the same source code in different locations.

You can configure and use an external repository for each of the following applications independently:

  • Sitefinity CMS

    NOTE: This requires the Developer Extensions toggle to be enabled.

  • ASP.NET Core Renderer

  • Next.js Renderer

  • Sitefinity backend UI extensions

For example, you can keep the Sitefinity CMS source in your own GitHub organization while your decoupled Renderer continues to use the repository provisioned in your Sitefinity Cloud project.

Create the required service connection

PREREQUISITES: Before Sitefinity Cloud can build from your external repository, a service connection to it must exist in your project.
You need to create this service connection, because it requires credentials to your source control system that only your organization holds. Progress Software does not have and does not request access to that repository.

Perform the following:

  1. Log in to your Sitefinity Cloud Management Portal.
  2. Navigate to Project settings » Service connections and click New service connection.
  3. Select the type that matches your source control system, for example GitHub, and complete the authentication.
  4. Provide a name for the service connection and grant access to all pipelines.

Once the service connection exists, provide the following details to Progress Software - for each application whose source code is hosted externally:

  • The name of the service connection
  • The full name of the repository, for example, my-organization/my-repository
  • The branch that Sitefinity Cloud builds by default

Progress Software then configures your Sitefinity Cloud project to build from the external repository.

Work with an external repository

Once an external repository is configured, the day-to-day development workflow changes in the following ways:

  • Pull requests, branch policies, and code review happen in your own source control system.
  • The repository provisioned inside your Sitefinity Cloud project remains, but it holds only the pipeline definition. Do not use it to store source code.
  • The CI/CD pipelines continue to run in the Management Portal, and deployment approvals work as described in Deploy code changes.

Choose the revision to build

Each CI/CD pipeline for an application with an external repository has a Branch/Commit/Tag variable. Its value determines the revision that the pipeline checks out and builds.

This variable defaults to the branch agreed with Progress Software during the setup process. To build a different revision, set the variable when you queue the pipeline. It accepts a branch name, a tag, or a commit identifier.

NOTE: Automatic deployment triggers and branch filters are evaluated against the value of the Branch/Commit/Tag variable. Specify a branch name when you rely on the branch filters configured for your environments.