You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/getting-started/license-key/CI-license-validation.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,17 @@ The following section shows how to validate the Syncfusion license key in CI ser
25
25
26
26
* Download and extract the LicenseKeyValidator.zip utility from the following link: [LicenseKeyValidator](https://s3.amazonaws.com/files2.syncfusion.com/Installs/LicenseKeyValidation/LicenseKeyValidator.zip).
27
27
28
-
* Open the LicenseKeyValidation.ps1 PowerShell script in a text\code editor.
28
+
* Open the LicenseKeyValidation.ps1 PowerShell script in a text\code editor as shown in the below example.
29
+
30
+
{% tabs %}
31
+
{% highlight c# tabtitle="PowerShell" %}
32
+
# Replace the parameters with the desired platform, version, and actual license key.
@@ -39,9 +49,9 @@ The following section shows how to validate the Syncfusion license key in CI ser
39
49
40
50
## Azure Pipelines (YAML)
41
51
42
-
* 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).
52
+
* 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 the Azure Pipeline. Use the path of the LicenseKeyValidation.ps1 script file as a value (e.g., D:\LicenseKeyValidator\LicenseKeyValidation.ps1).
43
53
44
-
* Integrate the PowerShell task in pipeline and execute the script to validate the license key.
54
+
* Integrate the PowerShell task in the pipeline and execute the script to validate the license key.
45
55
46
56
The following example shows the syntax for Windows build agents.
47
57
@@ -63,17 +73,17 @@ steps:
63
73
64
74
## Azure Pipelines (Classic)
65
75
66
-
* 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).
76
+
* 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 the Azure Pipeline. Use the path of the LicenseKeyValidation.ps1 script file as a value (e.g., D:\LicenseKeyValidator\LicenseKeyValidation.ps1).
67
77
68
-
* Include the PowerShell task in pipeline and execute the script to validate the license key.
78
+
* Include the PowerShell task in the pipeline and execute the script to validate the license key.
* 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).
75
85
76
-
The following example shows the syntax for validating Syncfusion license key in GitHub actions.
86
+
The following example shows the syntax for validating the Syncfusion license key in GitHub actions.
77
87
78
88
{% tabs %}
79
89
{% highlight c# tabtitle="YAML" %}
@@ -87,11 +97,11 @@ The following example shows the syntax for validating Syncfusion license key in
87
97
88
98
## Jenkins
89
99
90
-
* 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).
100
+
* Create an[Environment Variable](https://www.jenkins.io/doc/pipeline/tour/environment) named 'LICENSE_VALIDATION'. Use the path of the LicenseKeyValidation.ps1 script file as a value (e.g., D:\LicenseKeyValidator\LicenseKeyValidation.ps1).
91
101
92
102
* Include a stage in Jenkins to execute the LicenseKeyValidation.ps1 script in PowerShell.
93
103
94
-
The following example shows the syntax for validating Syncfusion license key in Jenkins pipeline.
104
+
The following example shows the syntax for validating the Syncfusion license key in the Jenkins pipeline.
95
105
96
106
{% tabs %}
97
107
{% highlight json %}
@@ -111,11 +121,11 @@ pipeline {
111
121
{% endhighlight %}
112
122
{% endtabs %}
113
123
114
-
## Validate the License Key Using ValidateLicense() Method
124
+
## Validate the License Key By Using the ValidateLicense() Method
115
125
116
126
* Register the license key properly by calling RegisterLicense("License Key") method with the license key.
117
127
118
-
* 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.
128
+
* Once the license key is registered, it can be validated by using the 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.
* If ValidateLicense() method returns true, registered license key is valid and can proceed with deployment.
144
+
* If the ValidateLicense() method returns true, registered license key is valid and can proceed with deployment.
135
145
136
-
* If ValidateLicense() method returns false, there will be invalid license errors in deployment due to either an invalid license key or an incorrect assembly or package version that is referenced in the project. Please ensure that all the referenced Syncfusion assemblies or NuGet packages are all on the same version as the license key’s version before deployment.
146
+
* If the ValidateLicense() method returns false, there will be invalid license errors in deployment due to either an invalid license key or an incorrect assembly or package version that is referenced in the project. Please ensure that all the referenced Syncfusion assemblies or NuGet packages are all on the same version as the license key’s version before deployment.
0 commit comments