Component Licensing Issue

Ty's Avatar

Ty

03 Jul, 2018 05:25 PM

I am having difficulties licensing a 3rd party control as part of our build process. I am activating a license when the build starts and deactivating the license when the build completes. I am experiencing two issues. One: When msbuild goes to construct the dll with references to the 3rd party component, the build stops. I don't get an error message and the build does not continue.

I'm unable to determine what could stall the build. The license activation appears to have worked and returned a success code.

My next issue is that when this happens I have to manually cancel the build. It doesn't look like the the deactivation job in the on_finish is running. Is there a way to insure that the deactivation job always runs even on a manual cancel?

Here's our build script:

version: 1.0. {build}
image: Visual Studio 2017
environment:
CERT_PASS:
secure: nFS2CE/1sZ5mLdduilbUUw==
priv_key:
secure: <key removed>
cache:
- '%LocalAppData%\NuGet\Cache -> **\packages.config'
clone_depth: 1
install:
- ps: $fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
- ps: $fileContent += $env:PRIV_KEY.Replace(' ' , "`n" )
- ps: $fileContent += "`n-----END RSA PRIVATE KEY-----`n"
- ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
- cmd: git submodule -q update --init --recursive
before_build:
- ps: .\enterprise\test\assert-spaces_not_tabs.ps1
- cmd: enterprise\C1Activate.bat
- nuget restore -Verbosity quiet tw.core/TW.Core.sln
- nuget restore -Verbosity quiet enterprise/Connected.sln
build_script:
- msbuild tw.core/TW.Core.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild enterprise/Connected.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
after_build:
- ps: $now = Get-Date
- ps: $nowUtc = [ System.TimeZoneInfo] : :ConvertTimeToUtc($now)
- ps: $tz = [ System.TimeZoneInfo] : :FindSystemTimeZoneById( "Mountain Standard Time" )
- ps: $nowDenver = [ System.TimeZoneInfo] : :ConvertTimeFromUtc($nowUtc, $tz)
- ps: $env:DESKTOP_VERSION = $nowDenver.ToString("yyyy.Mdd.Hmm")
- cd enterprise
- build-all.bat %DESKTOP_VERSION%
test: off
artifacts:
- path: .\enterprise\squirrelreleases\
on_finish:
- cmd: C1Deactivate.bat

Do I have any options to license a build machine and reuse the licensed image?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 03 Jul, 2018 07:39 PM

    Ilya Finkelshteyn's Avatar

    Hi Ty,

    Please RDP to build worker and see what happens. I would recommend to add non-blocking RDP at init stage. Maybe you will see some interactive window pops up and waiting for input. If not you can re-run command which stuck in RDP session and see how it goes. Note however that custom environment variables are not available in RDP session so you might need to re-creates some of them.

    You can de-activate the license in RDP too. However this might be not necessary. Build VM is transient and destroyed immediately after build. So not traces of your license stay anywhere.

    Regarding custom build image you maybe interested in private build cloud:
    https://www.appveyor.com/docs/build-environment/#private-build-cloud
    https://www.appveyor.com/docs/enterprise/how-to/#private-build-clouds

    Ilya.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac