adartois
Posts: 3
Joined: Fri Aug 27, 2021 9:34 am

Azure Dev Ops - Update Automation

Fri Aug 27, 2021 10:47 am

Hello,

I need to automate generation of updates.txt from an azure build.

Actually, i create an updates.txt with this first task.

- task: AdvancedInstaller@2
displayName: 'Create NewUpdate for WST.Support Setup'
inputs:
aipPath: '$(Build.SourcesDirectory)/Installer/WSTSupportInstaller/UpdateConfiguration.aip'
aipBuild: 'DefaultBuild'
aipExtraCommands: 'NewUpdate "WSTSupportSetup-$(MainInstallerVersion).exe" -name "$(MainInstallerVersion)" -display_name "Update v.$(MainInstallerVersion)" -url $(UpdateBaseUrl)WSTSupportSetup-$(MainInstallerVersion).exe'

It's working, it's generating a new updates.txt with my new update
.

Now i would like to edit this updates.txt with a second task (or maybe do this only in one task but i can't make it work ...) for adding custom parameters to updates.txt

- task: AdvancedInstaller@2
displayName: 'Edit Update Options'
inputs:
aipPath: '$(Build.SourcesDirectory)/updates.txt'
aipBuild: 'DefaultBuild'
aipExtraCommands: 'UpdateInstaller "$(MainInstallerVersion)" -path "WSTSupportSetup-$(MainInstallerVersion).exe" -no_cache -no_elevation -compute_md5 -command_line "/qn" Save'


I have this error in build log :

Starting: Edit Update Options
==============================================================================
Task : Advanced Installer Build
Description : Build setup packages using Advanced Installer.
Version : 2.0.6
Author : Caphyon
Help :
==============================================================================
Downloading: https://www.advancedinstaller.com/downloads/updates.ini
Checking if a cached copy exists for this version...
Found tool in cache: advinst 18.6.0 x86
Cached copy of AdvancedInstaller exists. No need to install afresh. Cached tool location: C:\hostedtoolcache\windows\advinst\18.6.0\x86.
Prepending PATH environment variable with directory: C:\hostedtoolcache\windows\advinst\18.6.0\x86\bin\x86
C:\hostedtoolcache\windows\advinst\18.6.0\x86\bin\x86\AdvancedInstaller.com /execute D:\a\1\s\updates.txt D:\a\_temp\3320.aic
Parse error in file: "D:\a\1\s\updates.txt" at line: [1] column: [0] (code: not well-formed (invalid token)).
##[error]Failed to execute Advanced Installer task. Error: Parse error in file: "D:\a\1\s\updates.txt" at line: [1] column: [0] (code: not well-formed (invalid token)).

Thanks You.

adartois
Posts: 3
Joined: Fri Aug 27, 2021 9:34 am

Re: Azure Dev Ops - Update Automation

Fri Aug 27, 2021 1:26 pm

Got it to work like this ... If somebody is interested


- task: AdvancedInstaller@2
displayName: 'Build Setup (EXE)'
inputs:
aipPath: '$(Build.SourcesDirectory)/Installer/WSTSupportInstaller/WSTSupportInstaller.aip'
aipBuild: 'DefaultBuild'
aipPackageName: 'WSTSupportSetup-$(MainInstallerVersion).exe'
aipExtraCommands: |
SetVersion $(MainInstallerVersion)
SetUpdatesUrl $(UpdateBaseUrl)updates.txt
Save

- task: AdvancedInstaller@2
displayName: 'Create NewUpdate for WST.Support Setup'
inputs:
aipPath: '$(Build.SourcesDirectory)/Installer/WSTSupportInstaller/UpdateConfiguration.aip'
aipBuild: 'DefaultBuild'
aipExtraCommands: |
NewUpdate "WSTSupportSetup-$(MainInstallerVersion).exe" -name "$(MainInstallerVersion)" -display_name "Update v.$(MainInstallerVersion)" -url $(UpdateBaseUrl)WSTSupportSetup-$(MainInstallerVersion).exe
Save

- task: AdvancedInstaller@2
displayName: 'Update Update with silent install parameter'
inputs:
aipPath: '$(Build.SourcesDirectory)/Installer/WSTSupportInstaller/UpdateConfiguration.aip'
aipBuild: 'DefaultBuild'
aipExtraCommands: |
UpdateInstaller "$(MainInstallerVersion)" -path "$(MainInstallerVersion).exe" -command_line "/exenoui /qn" -no_cache -no_elevation -compute_md5 -install_silent
Save
Last edited by adartois on Thu Sep 02, 2021 2:38 pm, edited 1 time in total.

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

Re: Azure Dev Ops - Update Automation

Fri Aug 27, 2021 3:08 pm

Hello and welcome to our forums,

Thank you for your followup on this and for sharing your solution with us!

I am sure this will be of help for further users facing a similar scenario. :)

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

Return to “Building Installers”