Post-scaffolding
1. Package tailoring
The packages generated by cmf new
are as neutral, to be compatible with as many deployment scenarios as possible. However, some tailoring is advised for specific targets. This tailoring allows the packages to better adapt to their deployment target, eliminating the need for manual steps when installing.
Below are some tailoring options per CLI version and target environment. for specific targets. It's recommended that these changes be applied according to your target environment.
Important
Preserve the order of steps referenced in this document.
CLI version 3x
On the Tests MasterData Package add the property:
"isToSetDefaultSteps": false
On the Business Package remove steps:
"steps": [
{
"order": 1,
"type": "Generic",
"onExecute": "$(Agent.Root)/agent/scripts/stop_host.ps1"
},
{
"order": 2,
"type": "DeployFiles",
"ContentPath": "**/!(Cmf.Custom.*.BusinessObjects*).dll"
},
{
"order": 3,
"type": "Generic",
"onExecute": "$(Agent.Root)/agent/scripts/start_host.ps1"
}
]
On Data, IoTData and Tests MasterData Package remove steps:
"steps": [
{
"order": 1,
"type": "Generic",
"onExecute": "$(Agent.Root)/agent/scripts/stop_host.ps1"
},
{
"order": 2,
"type": "TransformFile",
"file": "Cmf.Foundation.Services.HostService.dll.config",
"tagFile": true
},
{
"order": 3,
"type": "Generic",
"onExecute": "$(Agent.Root)/agent/scripts/start_host.ps1"
},
{
"order": 4,
"type": "DeployFiles",
"ContentPath": "GenerateLBOs.ps1"
},
{
"order": 5,
"type": "Generic",
"onExecute": "$(Package[Cmf.Custom.Package].TargetDirectory)/GenerateLBOs.ps1"
}
]
CLI version 2x
On the Root Package add "Cmf.Environment" dependency:
"dependencies": [{
"id": "Cmf.Environment",
"version": "8.3.0"
}]
On the Business Package add the step to exclude custom Business objects deployment (they must be generated by the MES Host Service on the first start-up):
"steps": [{
"order": "1",
"type": "DeployFiles",
"ContentPath": "**/!(Cmf.Custom.*.BusinessObjects*).dll"
}]
On the Root and IoT Root Package add "CriticalManufacturing.DeploymentMetadata" dependency:
"dependencies": [{
"id": "CriticalManufacturing.DeploymentMetadata", "
version": "8.3.0"
}]
On the Business Package **add the following steps to :
"steps": [
{
"order": 1,
"type": "Generic",
"onExecute": "$(Agent.Root)/agent/scripts/stop_host.ps1"
},
{
"order": 2,
"type": "DeployFiles",
"ContentPath": "**/!(Cmf.Custom.*.BusinessObjects*).dll"
},
{
"order": 3,
"type": "Generic",
"onExecute": "$(Agent.Root)/agent/scripts/start_host.ps1"
}]
On Data, IoTData and Tests MasterData Package add steps:
"steps": [
{
"order": 1,
"type": "Generic",
"onExecute": "$(Agent.Root)/agent/scripts/stop_host.ps1"
},
{
"order": 2,
"type": "TransformFile",
"file": "Cmf.Foundation.Services.HostService.dll.config",
"tagFile": true
},
{
"order": 3,
"type": "Generic",
"onExecute": "$(Agent.Root)/agent/scripts/start_host.ps1"
},
{
"order": 4,
"type": "DeployFiles",
"ContentPath": "GenerateLBOs.ps1"
},
{
"order": 5,
"type": "Generic",
"onExecute": "$(Package[Cmf.Custom.Package].TargetDirectory)/GenerateLBOs.ps1"
}]
2. Store project on source control
Store the results of project scaffolding on the source control.
3. Automate the release process
If possible automate your release process.
Note
CM has created the cmf-pipelines
CLI plugin to automate the release process for
teams using its internal infrastructure.
The CI/CD pipelines highly depend on the technology and infrastructure being used for the project, and due to that, this plugin is not publicly available. More information is available on CM Internal Development Portal.