I am working on a CI/CD pipeline for Automation Studio 6 projects. The goal is to compile, test, and release B&R-specific packages maintained on a Git server.
To achieve this, I am trying to reproduce the entire compilation and testing process without opening Automation Studio itself.
Currently, I am looking for ways to automate the simulation startup according to the project configuration, including the simulation startup and integration process.
The B&R Online Help article mentions the generation of the ARSim image. I have also noticed that an ARSim image is created automatically when opening the project.
However, I would like to recreate the same structure during each checkout, as some project-specific details may have changed.
I have come across this Library, but it does not seem to create the ARSim structure. Instead, it appears to reuse an existing one.
Is there a way to generate this structure without using the user interface?
If not, I would like to ask the following questions:
Which parts of this structure are project-specific, and which are not?
Is the runtime already included in this structure?
Would an alternative solution be to maintain multiple instances and start or reprogram one of them for each pipeline run?
Which steps would I need to do, if multiple instances are maintained?
Currently it is not possible to start or create an ARSim instance from the Automation Studio command line, but you can do it with Runtime Utility Centers(PVITransfer) command line.
So the basic flow would be:
Build a RUC Package for ArSim with the Automation Studio command line
Create a Instruction list file for PVITransfer(RUC)
Execute the Instruction list file with PVITransfer(RUC)
This will create and start the ArSim instance
Some more hints how to do this are available here.
I just managed to generate and start the Simulation with PVI6/PVITransfer and OfflineCommissioning Pil Command.
However, I think in the next few days I can finalize my scripts. Whats left is the correct transfer and setup of the software. But I think I will figure it out.
Is there anything else to consider, if using PVI6 instead of PVI4?
When creating the RUC Package and creating the ArSim instance from that should already include the software and the ArSim should start with it. So there should be no need for any additional project transfers.
There are some changes to the commands but in general should work in a similar way.