-
Notifications
You must be signed in to change notification settings - Fork 394
-SaveDscDependency does not work on Microsoft-hosted 'ubuntu-latest' agents #2096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Interesting, #1246 enabled Linux but testing requires DSC to be installed, which is something custom and at the time wasn't in the CI runner agents. I wonder whether that is still the case and you have checked that you have bootstrapped DSC on the ubuntu agent? |
@bergmeister yeah, you were right with DSC installation, it was missing from the agent. After following this guide https://learn.microsoft.com/en-us/powershell/dsc/getting-started/lnxgettingstarted?view=dsc-1.1 and applying some hacks from here microsoft/PowerShell-DSC-for-Linux#674 (comment) I have some partial success. The 'nxtools' DSC module is downloaded now and the script file scanned successfully, previously it was also not downloaded. However, the 'PSDscResources' and 'SecurityPolicyDSC' DSC modules are still not downloaded for some reason. For visibility, I'm providing the Azure YAML pipeline steps for the DSC setup:
|
WSL could be useful to try replicate/debug in an easier way? |
Steps to reproduce
We have some new scripts which rely on DSC modules (for example 'nxtools', 'PSDscResources' and 'SecurityPolicyDSC').
RestrictRDPForLocalAccounts.ps1
is one of the PowerShell script files that used DSC modules. While executing the PSScriptAnalyzer scan with the-SaveDscDependency
option on the Microsoft-hosted 'ubuntu-latest' agents in our CI/CD pipeline, the DSC modules are not saved:The same command works fine on Microsoft-hosted 'windows-latest' agents:
Expected behavior
Actual behavior
Environment data
Microsoft-hosted 'ubuntu-latest' agents
PowerShell 7.4.7
PSScriptAnalyzer: 1.24.0
The text was updated successfully, but these errors were encountered: