MDriven supports continuous-integration (CI) automation for build, evolve, and deploy-related work. The documented workflow automates the following steps:
- Generate all code to ensure that the code maps to the model.
- Rebuild all assemblies before upload for use with CodeDress.
- Upload to MDrivenServer to initiate evolve and the database.
The MDrivenFramework extension for Visual Studio 2022 includes additions intended to facilitate these steps.
Start Visual Studio for model automation[edit source]
Start Visual Studio with the solution file and provide the model through the MODELAUTOMATION argument:
"%DEVENV%" "%SLNFILE%" MODELAUTOMATION="%MODELFILE%"
Before starting Visual Studio, set the required MDrivenServer connection variables:
| Variable | Purpose |
|---|---|
MODELAUTOMATION_URL
|
MDrivenServer URL. |
MODELAUTOMATION_USER
|
MDrivenServer account. |
MODELAUTOMATION_PWD
|
Password for the MDrivenServer account. |
The following output settings are also documented:
| Variable | Purpose |
|---|---|
MODELAUTOMATION_OUTPUTDIRECTORY
|
Optional path for log and package output. |
MODELAUTOMATION_OUTPUTLOGPATHANDFULLNAME
|
Overrides MODELAUTOMATION_OUTPUTDIRECTORY for the log-file location.
|
MODELAUTOMATION_OUTPUTZIPPATHANDFULLNAME
|
Overrides MODELAUTOMATION_OUTPUTDIRECTORY for the package-file location.
|
The CI documentation states that MDRIVENAUTOMATIONRESULT.log, or the path specified by MODELAUTOMATION_OUTPUTLOGPATHANDFULLNAME, is produced after Visual Studio completes the automation.
Example[edit source]
The documented example configures the server URL, account, password, log-file path, model-file path, solution-file path, and the Visual Studio executable. It then starts Visual Studio with the solution and model-automation argument.
For the complete script and current operational details, see Documentation:ContinuousIntegration.
