Syncfusion license key validation in CI services
22 Jul 20242 minutes to read
The following section shows how to validate syncfusion license key in CI services.
-
Download and extract the LicenseKeyValidator.zip utility from the following link: LicenseKeyValidator.
-
Open the LicenseKeyValidation.ps1 PowerShell script in a text\code editor.
-
Update the parameters in the LicenseKeyValidation.ps1 script file as described below.
Platform: Modify the value for /platform: to the desired platform (e.g., “Windows Forms”).
Version: Change the value for /version: to the required version (e.g., “25.2.3”).
License Key: Replace the value for /licensekey: with your actual license key (e.g., “Your License Key”).
NOTE
This feature is supported only from the 16.2.X.X version of the Essential Studio Desktop and Mobile platform.
Azure Pipelines (YAML)
-
Create a new User-defined Variable 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.
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 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.
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.
steps:
- name: Syncfusion License Validation
shell: pwsh
run: |
./path/LicenseKeyValidator/LicenseKeyValidation.ps1
Jenkins
-
Create a Environment Variable 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.
pipeline {
agent any
environment {
LICENSE_VALIDATION = 'path\\to\\LicenseKeyValidator\\LicenseKeyValidation.ps1'
}
stages {
stage('Syncfusion License Validation') {
steps {
sh 'pwsh ${LICENSE_VALIDATION}'
}
}
}
}