dsccommunity / AzureDevOpsDsc

This module contains DSC resources for deployment and configuration of initially Azure DevOps Services and later Azure DevOps Server.
MIT License
1 stars 5 forks source link

AzureDevOpsDsc: Common module should be built with ModuleBuilder #13

Open johlju opened 3 years ago

johlju commented 3 years ago

In the source/Modules/AzureDevopsDsc.Common should be built using the pattern public/private folders.

We ought to be able to build the PSM1 by merging the Public/Private/Classes/etc. folders the same way as the top module. We should configure the NestedModules section in the build.yml

NestedModule:
  DscResource.Common:
    CopyOnly: true
    Path: ./output/RequiredModules/DscResource.Common
    AddToManifest: false
    Exclude: PSGetModuleInfo.xml
  AzDevOpsProject.Common:
    CopyOnly: false
    Path: ./source/Modules/AzureDevOpsDsc.Common
    AddToManifest: false

And remove the entry Modules from here:

https://github.com/dsccommunity/AzureDevOpsDsc/blob/8d43d12989359b8facdf46d86011a34dfe787898/build.yaml#L5-L9

That will replace the dot-source code in the file below, and will speed up the usage of the distributed resources.

https://github.com/dsccommunity/AzureDevOpsDsc/blob/8d43d12989359b8facdf46d86011a34dfe787898/source/Modules/AzureDevOpsDsc.Common/AzureDevOpsDsc.Common.psm1#L10-L45