License not getting packaged with GitHub actions

2 Answers 87 Views
Licensing
Robert
Top achievements
Rank 1
Iron
Robert asked on 18 Sep 2024, 10:09 PM | edited on 19 Sep 2024, 04:33 PM

Hello, my team and I are having an issue where kendo is not activated when building with github actions. This issue first surfaced when our license expired which led us to believe it is a caching issue. After updating the license in the variables and clearing the actions cache we are not seeing the activation happen successfully even though the same license activates correctly locally, and says it is correct during the github action build step. I have attached a cut down action .yml for reference. Looking for suggestions on additional things to check.

 


# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Automated Pipeline

on:
  push:
    branches: [ "master" ]
    paths-ignore:
      - 'docs/**'

env:
    PACKAGE_VERSION: ${{ format('1.0.{0}', github.run_number) }}

jobs:
  build:

    runs-on: windows-latest-l

    steps:
    # Check out code
    - uses: actions/checkout@v4

    # Configure Environment
    - name: Display Package Version
      run: echo "PACKAGE_VERSION = $env:PACKAGE_VERSION"

    - name: Configure .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x

    - name: Set up Node.js
      uses: actions/setup-node@v4
      with:
        node-version: 20
        cache: "yarn"
        cache-dependency-path: "**/yarn.lock"

    # Restore Dependencies
    - name: Restore dependencies
      run: dotnet restore ./OurApp.sln

    - name: Yarn install Portal
      run: yarn --cwd ./src/WebApp2Frontend install

    - name: Yarn install App
      run: yarn --cwd ./src/WebApp1Frontend install

    - name: Yarn run tests
      run: yarn --cwd ./src/WebApp1Frontend run test

    # Update Version Numbers
    - name: .NET project version updater
      uses: vers-one/dotnet-project-version-updater@v1.6
      with:
          file: "**/*.fsproj"
          version: ${{ env.PACKAGE_VERSION }}

      # Generate code files

      # Activate Kendo Licenses (App)
    - name: Activate Kendo UI License (App)
      run: yarn --cwd ./src/WebApp1Frontend run kendo-ui-license activate
      env:
        KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }}

      # Activate Kendo Licenses (App2)
    - name: Activate Kendo UI License (App2)
      run: yarn --cwd ./src/WebApp2Frontend run kendo-ui-license activate
      env:
        KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }}

    # Build (runs "yarn run build" in the frontend projects)
- name: Build run: dotnet build ./OurApp.sln --no-restore --configuration Release # Tests - name: Test run: dotnet test continue-on-error: true # Publish - name: Publish WebApp2 run: dotnet publish ./src/WebApp2/WebApp2.fsproj --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/app2 - name: Publish WebApp1 run: dotnet publish ./src/WebApp1/WebApp1.fsproj --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/app1 # Upload Artifacts # Octopus Deploy Package # Data Warehouse and Pulumi package already exists # Octopus Deploy Push # Create Octopus Release

2 Answers, 1 is accepted

Sort by
0
Accepted
Robert
Top achievements
Rank 1
Iron
answered on 20 Sep 2024, 09:31 PM

There was no other reference to KENDO_UI_LICENSE anywhere else that I could find. I also confirmed that there were no referenced projects. I did not see any copies of kendo-licensing either. I started with deleting the yarn.lock files, which was unsuccessful. However, in doing so I also changed from referencing the secret directly in the command to referencing it in the top level build env. That appears to have fixed my issue. I will show the changes I made in the .yml below.

 


 This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Automated Pipeline

on:
  push:
    branches: [ "master" ]
    paths-ignore:
      - 'docs/**'

env:
    PACKAGE_VERSION: ${{ format('1.0.{0}', github.run_number) }}
    KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }}

jobs:
  build:

    runs-on: windows-latest-l

    steps:
    # Check out code
    - uses: actions/checkout@v4

    # Configure Environment
    - name: Display Package Version
      run: echo "PACKAGE_VERSION = $env:PACKAGE_VERSION"

    - name: Configure .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x

    - name: Set up Node.js
      uses: actions/setup-node@v4
      with:
        node-version: 20
        cache: "yarn"
        cache-dependency-path: "**/yarn.lock"

    # Restore Dependencies
    - name: Restore dependencies
      run: dotnet restore ./OurApp.sln

    - name: Yarn install Portal
      run: yarn --cwd ./src/WebApp2Frontend install

    - name: Yarn install App
      run: yarn --cwd ./src/WebApp1Frontend install

    - name: Yarn run tests
      run: yarn --cwd ./src/WebApp1Frontend run test

    # Update Version Numbers
    - name: .NET project version updater
      uses: vers-one/dotnet-project-version-updater@v1.6
      with:
          file: "**/*.fsproj"
          version: ${{ env.PACKAGE_VERSION }}

      # Generate code files

      # Activate Kendo Licenses (App)
    - name: Activate Kendo UI License (App)
      run: yarn --cwd ./src/WebApp1Frontend run kendo-ui-license activate

      # Activate Kendo Licenses (App2)
    - name: Activate Kendo UI License (App2)
      run: yarn --cwd ./src/WebApp2Frontend run kendo-ui-license activate

    # Build (runs "yarn run build" in the frontend projects)

    - name: Build
      run: dotnet build ./OurApp.sln --no-restore --configuration Release

    # Tests
    - name: Test
      run: dotnet test
      continue-on-error: true

    # Publish
    - name: Publish WebApp2
      run: dotnet publish ./src/WebApp2/WebApp2.fsproj --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/app2

    - name: Publish WebApp1
      run: dotnet publish ./src/WebApp1/WebApp1.fsproj --no-build --configuration Release --output $env:GITHUB_WORKSPACE/artifacts/app1

    # Upload Artifacts

    # Octopus Deploy Package

    # Data Warehouse and Pulumi package already exists

    # Octopus Deploy Push
  
    # Create Octopus Release

0
Filip
Telerik team
answered on 20 Sep 2024, 02:46 PM

Hello, Robert,

Thank you for the provided .yml file.

The faced issue with activation failing can occur either due to cached data or due to outdated information in the license file. The license validity information changes after renewal, so when updating to a newer version, the license key must be regenerated and reactivated. I suspect that somewhere there is a reference to the older license. I can recommend the following steps for ensuring that:

  • Make a global search and check whether there is a copy of the KENDO_UI_LICENSE (e.g., it could be set in the System Environment variables as well) that would be loading an older license.
  • Make sure that there isn't a referenced project that might be using the old license
  • Ensure that there isn''t any copy of kendo-licensing with the following command:
    npm ls @progress/kendo-licensing

I can also recommend removing any *-lock files if present. Please give these suggestions a try and let me know if the license activation continues to fail.

Regards,
Filip
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Licensing
Asked by
Robert
Top achievements
Rank 1
Iron
Answers by
Robert
Top achievements
Rank 1
Iron
Filip
Telerik team
Share this question
or