As part of improving our CI/CD pipeline, we are looking for possibility of creating and deploying .dmprotocol . Is there any documentation on how to create .dmprotocol package?
The API documentation for creating dmprotocol packages can be found here: https://docs.dataminer.services/develop/api/types/Skyline.AppInstaller.AppPackageProtocol.AppPackageProtocolBuilder.html
We still need to add examples, but the following example below should give an idea on how to use it:
var protocolBuilder = new AppPackageProtocol.AppPackageProtocolBuilder("<name>", "<version>", "<protocolXmlFilePath"))
.WithAssembly("<assemblyFilePath>", "<destinationFolder>");
IAppPackageProtocol protocol = protocolBuilder.Build();
protocol.CreatePackage("<destinationDmprotocolFilePath>");
This API is part of the following NuGet package: Skyline.DataMiner.Core.AppPackageCreator
In the meantime we have developed a NuGet package where it can build a dmprotocol package based on a connector solution: https://www.nuget.org/packages/Skyline.DataMiner.CICD.DMProtocol
You can use this very simply with this line:
var package = await ProtocolPackageCreator.Factory.FromRepositoryAsync(new LogCollector(), solutionDirectory);