Open tomer-ds opened 4 years ago
Yeah, to work you ought to pin version 4.10.1 in the PSDepend psd1 file... But generally, I recommend starting with the dsccommunity/DscWorkshop project instead. It's an evolution from this sample project.
Hey, I'm not on a plane anymore, so I can give you a bit more details on this: https://github.com/gaelcolas/DscInfraSample/blob/master/PSDepend.build.psd1#L17 On this line you can see that the dependency it pulling the latest version of Pester at build time. As you saw, Pester 5 has breaking changes from Pester 4, and that's expected as per the major version increment.
So to fix that locally, you should replace latest
by 4.10.1
, remove the v5 downloaded to your ./BuildOutput/Modules/Pester
folder.
And from a clean session redo a .build.ps1 -resolveDependency
.
That should get you unstuck, but IMO you should probably look into DscWorkshop here:
The DSC Workshop is very similar approach to DscInfraSample, reworked and extended by @raandree @nyanhp, and I've contributed with my opinion here and there...
The work they've done is amazing and the best way I know to get started with a custom DSC (whether using Azure Automation DSC where you compile the MOFs yourselves, or using the Windows 2019 Pull server, or using a third party like AWS System Manager).
The "dependency" on AutomatedLab is mainly for automating the lab part (spinning up vms and bootstrapping them), but then relies on the DSC Pipeline for configuration (that's the part you're probably most interested in from a production point of view).
I'll update my blog posts and this repo to redirect to DSC Workshop, thanks for the reminder ;)
Hi Gael,
I have found your articles about this approach and this repositroy to very much link up with the biggest issue I have with DSC. So thanks!!!
I am however seeing this issue when running the
build.ps1 -ResolveDependencies
. Apparently it is downloading pester 5 that comes with many breaking changes. :I also see the following when attempting to run help:
Am I missing something?