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:
- 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.*" />
- Go to the License Keys page in your Telerik account and get your license key.
- 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)
- Create a new user-defined variable named
TELERIK_LICENSE
. - Paste the contents of the license key file as a value.
Azure Pipelines (Classic)
- Create a new user-defined variable named
TELERIK_LICENSE
. - Paste the contents of the license key file as a value.
GitHub Actions
- Create a new Repository Secret or an Organization Secret.
- Set the name of the secret to
TELERIK_LICENSE
and paste the contents of the license file as a value. - After running
npm install
oryarn
, add a build step to activate the license:Razorenv: TELERIK_LICENSE: ${ { secrets.TELERIK_LICENSE } } # remove the spaces between the brackets