GabrielIacob
Posts: 11
Joined: Tue Dec 08, 2020 10:30 am

Azure DevOps - License removal at Post-job

Tue Dec 08, 2020 10:57 am

Hello,

I observed that, if the Azure DevOps "Use Advanced Installer" is used, the post-job task will remove the license file.
This becomes an issue for the following scenario:

Timeline:

Pipeline 1 starts build on agent X
Pipeline 1 hits "Use Advanced Installer" task and installs AI
Pipeline 1 hits a Batch task that calls AI to build the installers.
Pipeline 2 starts build on same agent.
Pipeline 2 hits "Use Advanced Installer" task
Pipeline 1 hits post-job task and removes license.
Pipeline 2 hits same Batch task but fails because license was removed from that machine.


What should be a proper approach for such scenario in order to have successful builds on both pipelines, taking in consideration that preventing hitting the same machine is not an option.

Would changing the Batch to the "Build Advanced Installer" task solve this issue?


Best regards,
Gabriel Iacob

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Azure DevOps - License removal at Post-job

Wed Dec 09, 2020 1:59 pm

Hi Gabriel,

Indeed this is our current default design. The License file is deleted on post-job task.

As a workaround, yes please use a "Advanced Installer Build" task (instead of a batch to call Advanced Installer) and specify your license key in the "Advanced Installer Build" task.
screen2.jpg
screen2.jpg (277.71KiB)Viewed 25187 times
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Azure DevOps - License removal at Post-job

Wed Dec 09, 2020 4:10 pm

Hi Gabriel,

I have talked with our dev team about this limitation and we will try to add an improvement in this regard. We will try to make available a pipeline variable you could define in Azure DevOps and when such variable is set the license file cleanup on post-job task to be skipped.

When such improvement will be available we will update this forum thread.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Azure DevOps - License removal at Post-job

Wed Dec 09, 2020 6:34 pm

Hi Gabriel,

Also, as another possible workaround solution just add a "PowerShell Script" task (just after "Build Advanced Installer" task) with the following code:

Code: Select all

Write-Host "##vso[task.setvariable variable=advinst.cleanup;]"
Check attached screenshot.
image.png
image.png (123.29KiB)Viewed 25179 times
This should help you get rid off the license cleanup on post-job task.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

GabrielIacob
Posts: 11
Joined: Tue Dec 08, 2020 10:30 am

Re: Azure DevOps - License removal at Post-job

Tue Dec 15, 2020 12:43 pm

Hello,

Using the azure task for building did the job.

Thank you,
Gabriel Iacob

Catalin
Posts: 6539
Joined: Wed Jun 13, 2018 7:49 am

Re: Azure DevOps - License removal at Post-job

Wed Dec 16, 2020 8:29 pm

You are always welcome, Gabriel!

We are glad you got this working.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Azure DevOps - License removal at Post-job

Thu Dec 17, 2020 10:58 am

Hi,

Our dev team released a fix for this issue. From now on, when you have concurrent pipelines building an Advanced Installer setup project you can skip the license cleanup on post-build task.

To do so you should just define a pipeline variable like this:
  • Name: advancedinstaller.cleanup
    Value: false
Check the attached screenshot.
screen.jpg
screen.jpg (428.18KiB)Viewed 25151 times
All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”