Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

183389 - UG Documentation For Syncfusion License Key Validation - dev #869

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions winui-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<li><a href="/winui/licensing/overview">Overview</a></li>
<li><a href="/winui/licensing/how-to-generate">How to Generate Syncfusion WinUI License Key?</a></li>
<li><a href="/winui/licensing/how-to-register-in-an-application">How to Register Syncfusion License Key in WinUI Application?</a></li>
<li><a href="/winui/licensing/ci-license-validation">How to Validate Syncfusion License Key In CI Services?</a></li>
<li><a href="/winui/licensing/licensing-errors">Licensing Errors</a></li>
<li>Licensing FAQ
<ul>
Expand Down
110 changes: 110 additions & 0 deletions winui/Licensing/ci-license-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
layout: post
title: Overview of Syncfusion license validation in CI services - Syncfusion
description: Learn here about how to register Syncfusion license key for Syncfusion application for license validation.
platform: WinUI
control: Essential Studio
documentation: ug
---

<style>
#license {
font-size: .88em!important;
margin-top: 1.5em; margin-bottom: 1.5em;
background-color: #fbefca;
padding: 10px 17px 14px
}
</style>


# Syncfusion license key validation in CI services

Syncfusion license key validation in CI services ensures that Syncfusion Essential Studio components are properly licensed during CI processes, Validating the license key at the CI level can prevent licensing errors during deployment. The following section shows how to validate the Syncfusion license key in CI services.

* Download and extract the LicenseKeyValidator.zip utility from the following link: [LicenseKeyValidator](https://s3.amazonaws.com/files2.syncfusion.com/Installs/LicenseKeyValidation/LicenseKeyValidator.zip).

* Open the LicenseKeyValidation.ps1 PowerShell script in a text\code editor.

![LicenseKeyValidation script](licensing-images/license-validation.png)

* Update the parameters in the LicenseKeyValidation.ps1 script file as described below.

**Platform:** Modify the value for /platform: to the actual platform "WinUI".

**Version:** Change the value for /version: to the required version (e.g., "26.2.4").

**License Key:** Replace the value for /licensekey: with your actual license key (e.g., "Your License Key").

N> This feature is supported only from the 16.2.0.41 version of the Essential Studio.

## Azure Pipelines (YAML)

* Create a new [User-defined Variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#user-defined-variables) named `LICENSE_VALIDATION` in Azure Pipeline. Use the path of the LicenseKeyValidation.ps1 script file as a value (e.g., D:\LicenseKeyValidator\LicenseKeyValidation.ps1).

* Integrate the PowerShell task in pipeline and execute the script to validate the license key.

The following example shows the syntax for Windows build agents.

```bash
pool:
vmImage: 'windows-latest'

steps:

- task: PowerShell@2
inputs:
targetType: filePath
filePath: $(LICENSE_VALIDATION) #Or the actual path to the script.

displayName: Syncfusion License Validation
```

## Azure Pipelines (Classic)

* Create a new [User-defined Variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#user-defined-variables) named `LICENSE_VALIDATION` in Azure Pipeline. Use the path of the LicenseKeyValidation.ps1 script file as a value (e.g., D:\LicenseKeyValidator\LicenseKeyValidation.ps1).

* Include the PowerShell task in pipeline and execute the script to validate the license key.

![LicenseKeyValidation script](licensing-images/license-validation-classic.png)

## GitHub actions

* To execute the script in PowerShell as part of a GitHub Actions workflow, include a step in the configuration file and update the path of the LicenseKeyValidation.ps1 script file (e.g., D:\LicenseKeyValidator\LicenseKeyValidation.ps1).

The following example shows the syntax for validating Syncfusion license key in GitHub actions.

```bash
steps:
- name: Syncfusion License Validation
shell: pwsh
run: |
./path/LicenseKeyValidator/LicenseKeyValidation.ps1
```

## Jenkins

* Create a [Environment Variable](https://www.jenkins.io/doc/pipeline/tour/environment) named 'LICENSE_VALIDATION'. Use Use the path of the LicenseKeyValidation.ps1 script file as a value (e.g., D:\LicenseKeyValidator\LicenseKeyValidation.ps1).

* Include a stage in Jenkins to execute the LicenseKeyValidation.ps1 script in PowerShell.

The following example shows the syntax for validating Syncfusion license key in Jenkins pipeline.

```bash
pipeline {
agent any
environment {
LICENSE_VALIDATION = 'path\\to\\LicenseKeyValidator\\LicenseKeyValidation.ps1'
}
stages {
stage('Syncfusion License Validation') {
steps {
sh 'pwsh ${LICENSE_VALIDATION}'
}
}
}
}
```

## See also

* [Licensing FAQ](https://help.syncfusion.com/common/essential-studio/licensing/overview/)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.