Collins
Posts: 142
Joined: Wed Oct 12, 2016 2:57 pm

Sign Based on CI Pipeline Variable

We are using a code sign process that counts each code signing request which is consuming more a large amount of requests, regardless if a file needs to be signed or not. We need a way to pass a pipeline variable to tell the projects \solutions if singing is needed or if it can be skipped. Ideally we want to be able to only sign based on a regex value, like for a release branch and to skip for anything else.
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Sign Based on CI Pipeline Variable

Hello,

From what I understand so far, you would like to condition the signing process in Advanced Installer based on a pipeline variable?

If that's the case, I am thinking you could perhaps create a PowerShell script that can enable/disable the signing for your project based on the condition you want.

Would that work for you?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 142
Joined: Wed Oct 12, 2016 2:57 pm

Re: Sign Based on CI Pipeline Variable

Yes, if that is possible so that all signing is disabled for all aip projects before building. Are there command line options available currently?
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Sign Based on CI Pipeline Variable

Hello Collins,

The following thread and article should help:

How to temporary disable/enable Digital Signature via command line

Working with Advanced Installer from the Command Line

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 142
Joined: Wed Oct 12, 2016 2:57 pm

Re: Sign Based on CI Pipeline Variable

Thank you. Is there a way to create a list of projects as well? I have over 40 AI projects that I need to reference.

Also, for the file of commands, should the extension be .txt or .AIC?

Code: Select all

AdvancedInstaller.com /execute <project> <command_file_path> [-nofail]
It would be nice if all of this could be done from a PowerShell script using a foreach.


Code: Select all

;aic
SetVersion 1.2
AddFile APPDIR\MyFolder C:\Folder\File.txt
AddFile APPDIR\MyFolder “%SAMPLE%File.txt“
SetProperty TESTPROP="TestValue"
Save
Rebuild
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Sign Based on CI Pipeline Variable

Hello,

Assuming your projects are all in the same folder, what we can do is:

1. add all of them to an array

Everything you wanted to know about arrays

2. run a foreach loop that will run AdvancedInstaller.com /execute command

ForEach-Object

Regarding the file of commands, it should be .AIC and also the first line should be:

Code: Select all

;aic
Working with Advanced Installer from the command line

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 142
Joined: Wed Oct 12, 2016 2:57 pm

Re: Sign Based on CI Pipeline Variable

I have tried with both PowerShell and using a batch file, but its not working for me. I've attached the files I am using.
Attachments
ResetSig.ps1.txt
(2.01 KiB) Downloaded 609 times
ResetSig.bat.txt
(3.4 KiB) Downloaded 584 times
ResetSig.AIC.txt
(23 Bytes) Downloaded 584 times
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Sign Based on CI Pipeline Variable

Hello,

Please note I have replied to you over the email.

Let's continue the thread over there and followup here once we reach a conclusive answer.

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

Return to “Feature Requests”