Best way to provide AS upgrades

I’m thinking about solutions for the following problem:

We use a build server, having Windows running on it, with a GitLab runner to build our AS projects in a CI/CD pipeline automatically. This build server can be used by more than 20 different projects with a lot of different hardware modules in it.

Our current issue is that we have to install every upgrade manually on our build server, when there are upgrades available for a module.

What would be a best practice to automatically keep this server up to date. I don’t think it would be efficient to simply download EVERY upgrade, but we also don’t want to to save the necessary upgrades in GitLab, to make them available to the AS on the build server.

I hope you guys get my problem, and maybe someone found an efficient solution for this.

Kind regards, and have a nice christmas time!

1 Like

Hi Melanie,

The AS has the functionality to save a project with upgrades in a .zip.
This .zip can be opened by the AS and then all the included upgrades will be installed.

Maybe you can make one project without code, only HW, where all possible modules are inserted.
’File / Save Project As Zip’ and open it in your build server with the AS; then all needed upgrades are installed.

Have a nice Christmas time too.

That’s the way we do it today, but what would be an efficient way to do that automatically? I don’t want to manually install all upgrades that way every 2 or 3 weeks.

1 Like

You can also install the upgrades via command line.
See the help: B&R Online Help

You can create a script that installs all necessary upgrades.

1 Like

Hello,

You could use the following shell script as basis. Taken from BnR-DevOps-Package/Automation and Build Server/Template Files/Dockerfile at main · br-automation-community/BnR-DevOps-Package

# install any needed upgrades
RUN Get-ChildItem "C:\Temp\AS_Upgrades" -Filter *.exe | Foreach-Object { \
    Write-Output 'installing ' $_.Name; \
    & $_.FullName -G='C:\BrAutomation' -V='C:\BrAutomation\AS412' -R | Out-Null; \
    }

So you have to think of providing a place where to keep the updates in the project folder that the project requires.

1 Like

Thanks, thats already gonna help! But I was thinking more of a way, where I don’t have to store the updates manually. I guess, thats not possible yet? The finest solution would be projects coming with something like a requirement list, and AS then being able to download the necessary packages before Build.

1 Like

The commandline to get the required updates could be found here: Listing project components

You could also check the source code of br-automation-community/BrPyZip: Python script that zips an Automation Studio project including all updates and instead of making a zip create the required upgrades from it.

The upgrades service running in the background from as downloads a zip with a addons.xml .. see C:\Temp\Local\ for the xml data. This contains the data what update are available and where to download them.. so you could also download them on the fly but then your build chain is linked to the uptime of our website.