New to Kendo UI for AngularStart a free 30-day trial

Adding the License Key to CI Services

This article describes how to set up and activate your Kendo UI for Angular license key across a few popular CI services by using environment variables or secrets.

The following general requirements apply to all CI/CD environments:

  • Regardless of the CI/CD tool you use, the step that installs the project dependencies must be executed before the step that activates the license.
  • The license activation step requires the @progress/kendo-licensing package to be downloaded and set up in your local environment or CI/CD pipeline.
  • To activate the license, you need a securely stored license key, either in your environment variables or in the CI/CD tool's secret management. Hardcoding license keys into the build script is strictly discouraged.
  • The CI pipeline configurations are not executable. They merely outline the specific sequence of steps.

For a runnable demo with setup pipelines for all CI services mentioned on this page, refer to the DevOps - Pipeline and Workflow GitHub repository.

Creating an Environment Variable

Each platform has a different process for setting environment variables. Some popular examples are listed below.

Starting with the 2025 Q1 release, the name of the environment variable changes from KENDO_UI_LICENSE to TELERIK_LICENSE and the downloaded file changes from kendo-ui-license.txt to telerik-license.txt. This change is required as all Telerik UI and Kendo UI products now use the same licensing mechanism with a common license key. See the Handling License Key File Name and Environment Variable Name Changes in the 2025 Q1 Release knowledge base article for more details.

GitHub Actions

  1. Create a new Repository Secret or an Organization Secret. Set the name of the secret to TELERIK_LICENSE and paste the content of the downloaded license file as a value.
  2. After running npm install or yarn, add a build step to activate the license.
yaml
steps:
    # ... Install modules before activating the license.
    - name: Install NPM modules
      run: |
        npm install -g @angular/cli
        npm install

    - name: Activate Kendo UI License
      run: npx kendo-ui-license activate
      # Set a working directory if the application is not in the repository root folder:
      # working-directory: 'ClientApp'
      env:
        TELERIK_LICENSE: ${{ secrets.TELERIK_LICENSE }}

    # ... Run an application build after the activation of the license.
    - name: Build Application
      run: npm run build --configuration production

GitLab CI/CD Pipelines

  1. Go to Settings > CI/CD > Variables in your GitLab project.
  2. Add a new TELERIK_LICENSE variable and paste the content of the downloaded license file as a value.
  3. After running npm install or yarn, add a build step to activate the license.
yaml
yaml# .gitlab-ci.yml file
variables:
  NODE_ENV: production

setup_dependencies:
  stage: setup
  script:
    - echo "Installing dependencies..."
    - npm install
  # ...

activate_license:
  stage: activate
  script:
    - echo "Activating Kendo UI license..."
    - npx kendo-ui-license activate
  environment:
    name: production
  variables:
    TELERIK_LICENSE: $TELERIK_LICENSE
  # ...

Azure Pipelines (YAML)

  1. Create a new Secret Variable named TELERIK_LICENSE.
  2. Paste the content of the downloaded license file as a value.

    Always consider the Variable size limit—if you are using a Variable Group, the license key will typically exceed the character limit for the variable values. The only way to have a long value in the Variable Group is to link it from Azure Key Vault. If you cannot use a Key Vault, then use a normal pipeline variable instead (see above) or use the Secure files approach instead.

  3. Install project dependencies with npm install or yarn.
  4. Add a build step to activate the license using npx kendo-ui-license activate or yarn run kendo-ui-license activate command.

The following example provides the syntax for Windows and Linux build agents.

yaml
pool:
  vmImage: 'windows-latest'
steps:
# ... Install modules before activating the license.
- script: call npm install
  displayName: 'Install NPM modules'
- script: call npx kendo-ui-license activate
  displayName: 'Activate Kendo UI License'
  # Set a working directory if the application is not in the repository root folder:
  # workingDirectory: 'ClientApp'
  env:
    TELERIK_LICENSE: $(TELERIK_LICENSE)
# ... Run an application build after the activation of the license.
- script: call npm run build --configuration production
  displayName: 'Build Application'

Azure Pipelines (Classic)

  1. Create a new Secret Variable named TELERIK_LICENSE.

  2. Paste the content of the downloaded license file as a value.

    Always consider the Variable size limit—if you are using a Variable Group, the license key will typically exceed the character limit for the variable values. The only way to have a long value in the Variable Group is to link it from Azure Key Vault. If you cannot use a Key Vault, then use a normal pipeline variable instead (see above) or use the Secure files approach instead.

  3. Before the NPM build task, add a new Bash task to the Agent job.

    Kendo UI for Angular - Activating Your License Key - Add a new Bash task to the Agent job in Azure

  4. Change the step to inline and use the following command:

    bash
    # Activate the license
    npx kendo-ui-license activate

    Kendo UI for Angular - Activating Your License Key - Activate Kendo License

Using Secure Files on Azure DevOps

Secure files are an alternative approach for sharing the license key file in Azure Pipelines that does not have the size limitations of environment variables.

You have two options for a file-based approach. Set the TELERIK_LICENSE_PATH variable or add a file named telerik-license.txt to the project directory or a parent directory.

Please, make sure that you’re referencing @progress/kendo-licensing v1.5.0 or later.

With a YAML pipeline, you can use the DownloadSecureFile@1 task, then use $(name.secureFilePath) to reference it.

yaml
# ... Install modules before activating the license.
- script: call npm install
  displayName: 'Install NPM modules'

- task: DownloadSecureFile@1
  name: DownloadTelerikLicenseFile # defining the 'name' is important
  displayName: 'Download Telerik License Key File'
  inputs:
    secureFile: 'telerik-license.txt'

- script: call npx kendo-ui-license activate
  displayName: 'Activate Kendo UI License'
  # Set a working directory if the application is not in the repository root folder:
  # workingDirectory: 'ClientApp'
  env:
    # use the name.secureFilePath value to set TELERIK_LICENSE_PATH
    TELERIK_LICENSE_PATH: $(DownloadTelerikLicenseFile.secureFilePath)

With a classic pipeline, use the “Download secure file” task and a PowerShell script to set TELERIK_LICENSE_PATH to the secure file path.

  1. Add a “Download secure file” task and set the output variable's name to telerikLicense.

    Kendo UI for Angular - Activating Your License Key - Activate Kendo License

  2. Add a PowerShell task and set the TELERIK_LICENSE_PATH variable and activate the license:

    Kendo UI for Angular - Activating Your License Key - Activate Kendo License

To set the environment variable and activate the license run the followin script:

bash
# Set TELERIK_LICENSE_PATH
Write-Host "Setting TELERIK_LICENSE_PATH to $(telerikLicense.secureFilePath)"
$Env:TELERIK_LICENSE_PATH = "$(telerikLicense.secureFilePath)"

# Activate Kendo UI license
npx kendo-ui-license activate

Alternatively, copy the file into the repository directory:

bash
# Copy telerik-license.txt from secure file
echo "Copying $(telerikLicense.secureFilePath) to $(Build.Repository.LocalPath)/telerik-license.txt"
Copy-Item -Path $(telerikLicense.secureFilePath) -Destination "$(Build.Repository.LocalPath)/telerik-license.txt" -Force

# Activate Kendo UI license
npx kendo-ui-license activate