diff --git a/blazor/getting-started/license-key/CI-license-validation.md b/blazor/getting-started/license-key/CI-license-validation.md index 0a098b3e47..1ac0081f85 100644 --- a/blazor/getting-started/license-key/CI-license-validation.md +++ b/blazor/getting-started/license-key/CI-license-validation.md @@ -19,7 +19,9 @@ margin-top: 1.5em; margin-bottom: 1.5em; # 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. +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. Set up the continuous integration process to fail in case the license key validation fails. Validate the passed parameters and the registered license key again to resolve the issue. + +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). @@ -43,7 +45,8 @@ Syncfusion license key validation in CI services ensures that Syncfusion Essenti The following example shows the syntax for Windows build agents. -```bash +{% tabs %} +{% highlight tabtitle ="YAML" %} pool: vmImage: 'windows-latest' @@ -55,7 +58,8 @@ steps: filePath: $(LICENSE_VALIDATION) #Or the actual path to the LicenseKeyValidation.ps1 script. displayName: Syncfusion License Validation -``` +{% endhighlight %} +{% endtabs %} ## Azure Pipelines (Classic) @@ -71,13 +75,15 @@ steps: The following example shows the syntax for validating Syncfusion license key in GitHub actions. -```bash +{% tabs %} +{% highlight tabtitle ="YAML" %} steps: - name: Syncfusion License Validation shell: pwsh run: | ./path/LicenseKeyValidator/LicenseKeyValidation.ps1 -``` +{% endhighlight %} +{% endtabs %} ## Jenkins @@ -87,7 +93,8 @@ The following example shows the syntax for validating Syncfusion license key in The following example shows the syntax for validating Syncfusion license key in Jenkins pipeline. -```bash +{% tabs %} +{% highlight json %} pipeline { agent any environment { @@ -101,7 +108,8 @@ pipeline { } } } -``` +{% endhighlight %} +{% endtabs %} ## Validate the License Key Using ValidateLicense() Method @@ -109,6 +117,18 @@ pipeline { * Once the license key is registered, it can be validated by using ValidateLicense("Platform.Blazor") method. This ensures that the license key is valid for the platform and version you are using. For reference please check the following example. +{% tabs %} +{% highlight c# %} +using Syncfusion.Licensing; + +//Register Syncfusion license key +Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY"); + +//Validate the registered license key +bool isValid = SyncfusionLicenseProvider.ValidateLicense(Platform.Blazor); +{% endhighlight %} +{% endtabs %} + ![LicenseKeyValidationMethod](images/license-validation-method.png) * If ValidateLicense() method returns true, registered license key is valid and can proceed with deployment. diff --git a/blazor/getting-started/license-key/how-to-register-in-an-application.md b/blazor/getting-started/license-key/how-to-register-in-an-application.md index 0682c10c23..401275b745 100644 --- a/blazor/getting-started/license-key/how-to-register-in-an-application.md +++ b/blazor/getting-started/license-key/how-to-register-in-an-application.md @@ -22,6 +22,8 @@ Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY N> * Place the license key between double quotes. Also, ensure that Syncfusion.Licensing.dll is referenced in your project where the license key is being registered. * Syncfusion license validation is done offline during application execution and does not require internet access. Apps registered with a Syncfusion license key can be deployed on any system that does not have an internet connection. +I> Syncfusion license keys can be validated during the Continuous Integration (CI) processes to ensure proper licensing and prevent licensing errors during deployment. Refer to the [CI License Validation] (https://blazor.syncfusion.com/documentation/getting-started/license-key/ci-license-validation) section for detailed instructions on how to implement it. + ## Blazor Web App Open **~/Program.cs** file and register the Syncfusion Blazor license key in the Blazor web app. diff --git a/blazor/getting-started/license-key/images/license-validation-method.png b/blazor/getting-started/license-key/images/license-validation-method.png index d1f688e1d4..c7cfdfc235 100644 Binary files a/blazor/getting-started/license-key/images/license-validation-method.png and b/blazor/getting-started/license-key/images/license-validation-method.png differ