Activate Kendo License before build in YAML causes error "License key signature is not valid"

0 Answers 531 Views
Licensing
Katharina
Top achievements
Rank 1
Katharina asked on 09 Nov 2022, 10:28 AM

Hi together,

On my local environment my license activation works well - I use the license key file there. But during deployment, I have a problem with the license activation - I need it because I call ng build there. I use an environment variable there.

This is how I do the license activation during deployment with Azure DevOps and YAML script:

  1. I've added a variable inside my DevOps library named KENDO_UI_LICENSE. The value of the variable is the content of my local license key file. The variable is a secret variable, but I have the same problem, if it is a normal text variable
  2. In my YAML file I do the following steps:

- task: Npm@1
        displayName: Install Packages for Angular Client
        inputs:
          command: ci
          workingDir: '<my working dir>'

 - script: 'npx kendo-ui-license activate'
        displayName: Activate Kendo UI License
        workingDirectory: '<my working dir>'
        env:
          KENDO_UI_LICENSE: $(KENDO_UI_LICENSE)

 - task: Npm@1
        displayName: Build Angular Client
        inputs:
          command: custom
          workingDir: '<my working dir>'
          customCommand: 'run build'

Everything works well except the "Activate Kendo UI License" script, there I get the error "License key signature is not valid". I think there is a problem with the environment variable.

Here is the output of the DevOps Pipeline console:

For 'npm ci':

> @progress/kendo-licensing@1.2.2 postinstall D:\agent\_work\1\s\DSO.Isys.Web.Client\IsysApp\node_modules\@progress\kendo-licensing

> node ./bin/kendo-ui-license.js activate --ignore-no-license

(INFO) Kendo UI: KENDO_UI_LICENSE environment variable not set

For 'npx kendo-ui-license activate':

Skriptinhalte:
npx kendo-ui-license activate
========================== Starting Command Output ===========================
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\agent\_work\_temp\ed2dfcbf-634f-43e2-8232-208b8ca7e658.cmd""
(INFO) Kendo UI: Reading license from KENDO_UI_LICENSE environment variable...
(ERROR) Kendo UI: License key signature is not valid. Please, download a new copy of the license and try again.
##[error]"Cmd.exe" wurde mit dem Code "2" beendet.

 

 

What am I doing wrong here?

Thanks for your help,

Katharina

Katharina
Top achievements
Rank 1
commented on 09 Nov 2022, 11:53 AM

Ah, I think I got it. I now moved the DevOps variable to my pipeline (from library > variable to pipeline > variable in the UI), and now it works! Console says now

(INFO) Kendo UI: Reading license from KENDO_UI_LICENSE environment variable...
(INFO) Kendo UI: License imported successfully.

No answers yet. Maybe you can help?

Tags
Licensing
Asked by
Katharina
Top achievements
Rank 1
Share this question
or