Skip to content

Commit 49faa8f

Browse files
Merge pull request #4690 from syncfusion-content/CI-validation-hf/26.2
CI-license-validation Improvement changes - hf/26.2
2 parents b394702 + 6da2a95 commit 49faa8f

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

blazor/getting-started/license-key/CI-license-validation.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ margin-top: 1.5em; margin-bottom: 1.5em;
1919

2020
# Syncfusion license key validation in CI services
2121

22-
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.
22+
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.
23+
24+
The following section shows how to validate the Syncfusion license key in CI services.
2325

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

@@ -43,7 +45,8 @@ Syncfusion license key validation in CI services ensures that Syncfusion Essenti
4345

4446
The following example shows the syntax for Windows build agents.
4547

46-
```bash
48+
{% tabs %}
49+
{% highlight <lang> tabtitle ="YAML" %}
4750
pool:
4851
vmImage: 'windows-latest'
4952

@@ -55,7 +58,8 @@ steps:
5558
filePath: $(LICENSE_VALIDATION) #Or the actual path to the LicenseKeyValidation.ps1 script.
5659

5760
displayName: Syncfusion License Validation
58-
```
61+
{% endhighlight %}
62+
{% endtabs %}
5963

6064
## Azure Pipelines (Classic)
6165

@@ -71,13 +75,15 @@ steps:
7175

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

74-
```bash
78+
{% tabs %}
79+
{% highlight <lang> tabtitle ="YAML" %}
7580
steps:
7681
- name: Syncfusion License Validation
7782
shell: pwsh
7883
run: |
7984
./path/LicenseKeyValidator/LicenseKeyValidation.ps1
80-
```
85+
{% endhighlight %}
86+
{% endtabs %}
8187

8288
## Jenkins
8389

@@ -87,7 +93,8 @@ The following example shows the syntax for validating Syncfusion license key in
8793

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

90-
```bash
96+
{% tabs %}
97+
{% highlight json %}
9198
pipeline {
9299
agent any
93100
environment {
@@ -101,14 +108,27 @@ pipeline {
101108
}
102109
}
103110
}
104-
```
111+
{% endhighlight %}
112+
{% endtabs %}
105113

106114
## Validate the License Key Using ValidateLicense() Method
107115

108116
* Register the license key properly by calling RegisterLicense("License Key") method with the license key.
109117

110118
* 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.
111119

120+
{% tabs %}
121+
{% highlight c# %}
122+
using Syncfusion.Licensing;
123+
124+
//Register Syncfusion license key
125+
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY");
126+
127+
//Validate the registered license key
128+
bool isValid = SyncfusionLicenseProvider.ValidateLicense(Platform.Blazor);
129+
{% endhighlight %}
130+
{% endtabs %}
131+
112132
![LicenseKeyValidationMethod](images/license-validation-method.png)
113133

114134
* If ValidateLicense() method returns true, registered license key is valid and can proceed with deployment.

blazor/getting-started/license-key/how-to-register-in-an-application.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY
2222
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.
2323
* 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.
2424

25+
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.
26+
2527
## Blazor Web App
2628

2729
Open **~/Program.cs** file and register the Syncfusion Blazor license key in the Blazor web app.
Loading

0 commit comments

Comments
 (0)