dsccommunity / ActiveDirectoryDsc

This module contains DSC resources for deployment and configuration of Active Directory Domain Services.
MIT License
341 stars 141 forks source link

Add PlatyPS to required modules #715

Open Borgquite opened 3 months ago

Borgquite commented 3 months ago

Pull Request (PR) description

As discussed in #714, adding PlatyPS to required modules in an attempt to resolve build errors

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

Borgquite commented 3 months ago

@johlju Sorry - not sure why this is failing?

johlju commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
Azure Pipelines successfully started running 1 pipeline(s).
johlju commented 3 months ago

Very strange - not sure either, kicked off the pipeline again. It got GitVersion 6 event if it says it should install v5. πŸ€”

johlju commented 3 months ago

Seems to work now, I can't see any errors in the build phase. Seems to work with adding PlatyPS.

This should also update the conceptual help so we should no longer need to have the individual .help.txt for the resources. They are generated automatically in the top en-US folder under ./output. πŸ€” Should be less to maintain hopefully?

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98%. Comparing base (bdde66f) to head (0afcf32). Report is 3 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dsccommunity/ActiveDirectoryDsc/pull/715/graphs/tree.svg?width=650&height=150&src=pr&token=p3P3tBCItu&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity)](https://app.codecov.io/gh/dsccommunity/ActiveDirectoryDsc/pull/715?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) ```diff @@ Coverage Diff @@ ## main #715 +/- ## =================================== Coverage 98% 98% =================================== Files 25 25 Lines 3475 3512 +37 =================================== + Hits 3406 3443 +37 Misses 69 69 ```
johlju commented 3 months ago

But there seems to a problem with this module, maybe because there is a docs folder in the helper module the auto-doc creates this file?

WARNING: Each file must end with a new line.
WARNING: D:\a\2\s\output\ActiveDirectoryDsc\6.6.0\en-US\ActiveDirectoryDsc.Common.psm1-help.xml does not end with a new
 line.

Solution 1. Moving the docs folder to source/WikiSource -each file add YAML Front Matter (markdown metadata) property Category and set it to Helper command. I think that will make the sidebar be generated with a section Helper command with the .md files that has the Category set to the same. Not tested though.

Solution 2. If the all common command can be made public we can just add a source/Public folder (command not called by resources can be in source/Private) then add each command with its comment-based help to individual script files. This will make the auto-doc automatically generate the docs on each build and automatically deploy it. This will remove the helper module and the resources must import ActiveDrectoryDsc instead. The unit tests must also be changed for the move commands to test the command in the built module.

Solution 3. Move the helper module to it's own repository similar to how DscResource.Common is seperated. Then add it the same way as DscResource.Common is used. Moving relevant commands to DscResource.Common is also an option. πŸ€”

Guessing solution 1 is easiest - at least moving away the 'docs' folder so it is not part of the generated module. πŸ™‚

Borgquite commented 3 months ago

@johlju OK - probably not something I can spend any more time on, sorry (doing this on company time). I'll leave this here in case someone else can pick it up!