diff --git a/Xamarin/Licensing/ci-license-validation.md b/Xamarin/Licensing/ci-license-validation.md new file mode 100644 index 000000000..40c07b571 --- /dev/null +++ b/Xamarin/Licensing/ci-license-validation.md @@ -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: xamarin +control: Essential Studio +documentation: ug +--- + + + + +# 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 "Xamarin". + + **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/) diff --git a/Xamarin/Licensing/licensing-images/license-validation-classic.png b/Xamarin/Licensing/licensing-images/license-validation-classic.png new file mode 100644 index 000000000..1370fd173 Binary files /dev/null and b/Xamarin/Licensing/licensing-images/license-validation-classic.png differ diff --git a/Xamarin/Licensing/licensing-images/license-validation.png b/Xamarin/Licensing/licensing-images/license-validation.png new file mode 100644 index 000000000..97cbfccb2 Binary files /dev/null and b/Xamarin/Licensing/licensing-images/license-validation.png differ diff --git a/xamarin-toc.html b/xamarin-toc.html index bb3d681e4..3ee010fe4 100644 --- a/xamarin-toc.html +++ b/xamarin-toc.html @@ -58,6 +58,7 @@
  • Overview
  • How to Generate Syncfusion Xamarin License Key?
  • How to Register Syncfusion License Key in Xamarin Application?
  • +
  • How to Validate Syncfusion License Key In CI Services?
  • Licensing Errors
  • Licensing FAQ