New to Telerik UI for ASP.NET CoreStart a free 30-day trial

Setting Up Your License Key in CI/CD Environment

This article describes how to set up and activate your Telerik UI for ASP.NET Core license key across a few popular CI/CD services by using environment variables.

The deployment articles in this documentation provide general guidance and fundamentals. Telerik does not provide technical support for setting up CI/CD environments or application publishing infrastructure, except for questions about using Telerik license keys.

Basics

When working with CI/CD platforms, always add the Telerik.Licensing NuGet package as a project dependency. This package activates the UI for ASP.NET Core components at build time by using the provided license key.

The license activation process in a CI/CD environment involves the following steps:

  1. Add the Telerik.Licensing NuGet package as a dependency to all projects that reference Telerik UI for ASP.NET Core or Telerik Document Processing:
    Razor
    <PackageReference Include="Telerik.Licensing" Version="1.*" />
  2. Go to the License Keys page in your Telerik account and get your license key.
  3. Set your license key value as an environment variable with a name TELERIK_LICENSE.

Creating Environment Variables

The recommended way to provide your license key to the Telerik.Licensing NuGet package in CI/CD environment is to use environment variables. Each CI/CD platform has a different process for setting environment variables. This article lists only some of the most popular examples.

Azure Pipelines (YAML)

  1. Create a new user-defined variable named TELERIK_LICENSE.
  2. Paste the contents of the license key file as a value.

Azure Pipelines (Classic)

  1. Create a new user-defined variable named TELERIK_LICENSE.
  2. Paste the contents of the license key file as a value.

GitHub Actions

  1. Create a new Repository Secret or an Organization Secret.
  2. Set the name of the secret to TELERIK_LICENSE and paste the contents of the license file as a value.
  3. After running npm install or yarn, add a build step to activate the license:
    Razor
    env:
        TELERIK_LICENSE: ${ { secrets.TELERIK_LICENSE } } # remove the spaces between the brackets

Next Steps

See Also