CI/CD unattended installation - providing license details/offline key

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 3 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
ALIENQuake
Posts: 112
Last visit: Mon Jan 29, 2024 7:35 am
Has voted: 4 times

CI/CD unattended installation - providing license details/offline key

Post by ALIENQuake »

Hi,

I would like to move all 'build and deploy' steps from my local machine to remote CI/CD service (AzureDevop/GitHub Actions) and use their agents.
So for the purpose of the CI/CD, I need a way to handle the unattended installation. Can you add a command-line switch for providing license details/offline key?
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: CI/CD unattended installation - providing license details/offline key

Post by Alexander Riedel »

From your question it is not quite clear what exactly you are asking for. Is this regarding generated MSI files or PowerShell Studio's own installer?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
ALIENQuake
Posts: 112
Last visit: Mon Jan 29, 2024 7:35 am
Has voted: 4 times

Re: CI/CD unattended installation - providing license details/offline key

Post by ALIENQuake »

PowerShell Studio's own installer.

CI/CD
1. Launch agent
2. Download SPS installer
3. Launch unattended installation + key
4. Clone project
5. Build project
6. Upload compiled .exe into storage
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: CI/CD unattended installation - providing license details/offline key

Post by Alexander Riedel »

I am sorry, but I do not think we have a mechanism for this, as it seems you want to do this in a repeated fashion rather than as a one time roll-out.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
ALIENQuake
Posts: 112
Last visit: Mon Jan 29, 2024 7:35 am
Has voted: 4 times

Re: CI/CD unattended installation - providing license details/offline key

Post by ALIENQuake »

Ok, let me ask differently:
- I can do the unattended installation via "PowerShell Studio 2020.msi" /passive
- Based on viewtopic.php?p=79341#p79341 comment, the 'compile form project from commandline' feature will be added soon.

So if the PowerShell Studio 2020 will be installed via unattended way and I immediately launch 'compilation of the form project from commandline' will this be successful?

This is the same workflow that people use for Visual Studio which is pre-installed on GitHub/Azure DevOps agents. Maybe you could also add pre-installed PowerShell Studio into those agents?
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: CI/CD unattended installation - providing license details/offline key

Post by Alexander Riedel »

Without a license it would create an exe that expires after three days, since it would be built with a trial version.
From what it sounds like, you want to install an instance of PowerShell Studio on a throwaway VM just for the purpose of a one-time packaging task of your application.
Then throw it all away again. I am not sure what the business reason for this is or the benefit. Visual Studio is way to monstrous to use on an online VM in any reasonable fashion, let alone any serious software development. Are you maybe referring to Visual Studio Code?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
ALIENQuake
Posts: 112
Last visit: Mon Jan 29, 2024 7:35 am
Has voted: 4 times

Re: CI/CD unattended installation - providing license details/offline key

Post by ALIENQuake »

No, I'm not referring to VSCode, I'm referring to full VS installed on 'build agents' of various CI/CD providers. Like this one: https://github.com/actions/virtual-envi ... -Readme.md

So all come to my request from the first post:
Please allow for an unattended way ( during installation or command line/special file at a certain location) for providing license details/offline key after unattended installation or directly to PSBuild.exe. Anything which lets you activate SPS without manually clicking GUI interface.

Got an idea: can I provide license details via registry?
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: CI/CD unattended installation - providing license details/offline key

Post by Alexander Riedel »

We have a mechanism for unattended activation if a license has offline privileges.
I am suspecting I do not really understand the motivation behind your request though.
From what you write I would have to understand you want to activate your license on a publicly shared image of a VM in order to facilitate building executables there. Which of course we would not condone :D
I am quite certain though that this is not what you mean, so maybe you can elaborate a little more on what you want to use your license in a shared cloud environment, who will have access to it, etc.
Our offline activation mechanism is intended for, well, offline use. Air-gaped environments and such. Using a license in a shared online VM is quite a different subject.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
ALIENQuake
Posts: 112
Last visit: Mon Jan 29, 2024 7:35 am
Has voted: 4 times

Re: CI/CD unattended installation - providing license details/offline key

Post by ALIENQuake »

First of all, please get to know about CI/CD concept https://github.com/features/actions

One of the elements of CI/CD is the so-called 'build agents'. It's not publicly available VM, you can't even RDP to it as you can read from the documentation of the free, build in Microsoft agent which I linked above. And they are destroed at the end of each execution of the CI/CD pipeline. The GUI interaction is impossible for those agents.

So the main purpose of offline activation would be such kind of workflow:

Basically, I would like to have automated tests and build each time when I create new tag/release:
  1. push changes to the online git repository
  2. push tag
  3. launch agent
  4. download SPS installer
  5. launch the unattended installation and provide offline key without using GUI
  6. clone project
  7. run tests > fail if not successful
  8. build project
  9. upload compiled .exe into the place where the application download its updates
How to know if my license has offline privileges? If not, how I can get one? Let's assume that my license has it, do you see a way to accomplish step 5 "launch the unattended installation and provide offline key without using GUI"?
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: CI/CD unattended installation - providing license details/offline key

Post by Alexander Riedel »

Your license does not have offline activation and this particular use does not qualify for this in either case.
This will require a revision of the EULA since it involves transmitting license data to a third party.
It also requires testing because I am not sure how this agent will be able to verify the supplied licensing information with our server, if at all.
I will discuss it with the team next year when we are all back at work.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 3 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.