Skip to content
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

Build DSC Artifacts step of azuredevops pipeline failure #152

Open
bls-droid opened this issue Feb 13, 2023 · 2 comments
Open

Build DSC Artifacts step of azuredevops pipeline failure #152

bls-droid opened this issue Feb 13, 2023 · 2 comments
Assignees

Comments

@bls-droid
Copy link

bls-droid commented Feb 13, 2023

Problem description

Hello,
I am running the lab deployment with local Hyper-v AzureDevOps scenario, based on Server 2022, Azure Devops Server 2022 and SQL server 2019.
When running the Devops pipeline I get a failure at the Build DSC Artifacts stage. I included the log at the bottom.
When I run the same cmd ( C:\BuildWorker1_work\2\s> .\build.ps1 -ResolveDependency -tasks build ) in a powershell window directly on the buildworker machine, I still get the same errors but the build finishes and generates the artifacts. One additional message I see in the direct execute in powershell is this one.

Verbose logs

Log snipped from the AzureDevops pipeline:

Formatted command: . 'C:\BuildWorker1\_work\2\s\build.ps1' -ResolveDependency -tasks build
========================== Starting Command Output ===========================
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\BuildWorker1\_work\_temp\4a444eb0-bab9-4db7-b4fa-4dcaa757d362.ps1'"
[pre-build] Starting Build Init
[pre-build] Creating required modules directory C:\BuildWorker1\_work\2\s\output\RequiredModules.
[pre-build] Pre-pending 'C:\BuildWorker1\_work\2\s\output\RequiredModules' folder to PSModulePath
[pre-build] Resolving dependencies.
[pre-build] Starting bootstrap process.
WARNING: Error attempting to import Bootstrap's default parameters from 
'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1': The file 'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1' could
 not be parsed as a PowerShell Data File..
PackageManagement\Save-Package : No match was found for the specified search criteria and module name 'Sampler'. Try 
Get-PSRepository to see all available registered module repositories.
At 
C:\Windows\system32\config\systemprofile\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 
char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exceptio 
   n
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage
 
##[error]PowerShell exited with code '1'.
Finishing: Build DSC Artifacts

Console output from the direct execution on the buildworker machine.

PS C:\BuildWorker1\_work\2\s> .\C:\BuildWorker1\_work\2\s\build.ps1 -ResolveDependency -tasks build
.\C:\BuildWorker1\_work\2\s\build.ps1 : The term '.\C:\BuildWorker1\_work\2\s\build.ps1' is not recognized as the name
of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,     verify that the path is correct and try again.                                                                          At line:1 char:1                                                                                                        + .\C:\BuildWorker1\_work\2\s\build.ps1 -ResolveDependency -tasks build                                                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                     + CategoryInfo          : ObjectNotFound: (.\C:\BuildWorker1\_work\2\s\build.ps1:String) [], CommandNotFoundExcept     ion                                                                                                                      + FullyQualifiedErrorId : CommandNotFoundException                                                                                                                                                                                          PS C:\BuildWorker1\_work\2\s> .\build.ps1 -ResolveDependency -tasks build                                               [pre-build] Starting Build Init                                                                                         [pre-build] Pre-pending 'C:\BuildWorker1\_work\2\s\output\RequiredModules' folder to PSModulePath                       [pre-build] Resolving dependencies.                                                                                     [pre-build] Starting bootstrap process.                                                                                 Import-PowerShellDataFile : The file 'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1' could not be parsed as a       PowerShell Data File.                                                                                                   At C:\BuildWorker1\_work\2\s\Resolve-Dependency.ps1:131 char:34                                                         + ... yDefaults = Import-PowerShellDataFile -Path $resolveDependencyConfigP ...                                         +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                 + CategoryInfo          : InvalidData: (:) [Import-PowerShellDataFile], InvalidOperationException                       + FullyQualifiedErrorId : CouldNotParseAsPowerShellDataFile,Import-PowerShellDataFile

WARNING: Error attempting to import Bootstrap's default parameters from
'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1': You cannot call a method on a null-valued expression..
WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the
 applications.
PackageManagement\Save-Package : No match was found for the specified search criteria and module name 'Sampler'. Try
Get-PSRepository to see all available registered module repositories.
At C:\Users\Install.contoso\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exceptio
   n
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

PackageManagement\Save-Package : No match was found for the specified search criteria and module name
'powershell-yaml'. Try Get-PSRepository to see all available registered module repositories.
At C:\Users\Install.contoso\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exceptio
   n
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

PackageManagement\Save-Package : No match was found for the specified search criteria and module name 'Plaster'. Try
Get-PSRepository to see all available registered module repositories.
At C:\Users\Install.contoso\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exceptio
   n
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

[build] Starting build with InvokeBuild.
[build] Parsing defined tasks
[build] Loading Configuration from C:\BuildWorker1\_work\2\s\build.yaml
[build] Pre-pending 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap' folder to PSModulePath
Importing tasks from module Sampler
         Loading Build-Module.ModuleBuilder.build.Sampler.ib.tasks...
         Loading ChocolateyPackage.build.Sampler.ib.tasks...
         Loading Clean.ModuleBuilder.build.Sampler.ib.tasks...
         Loading Create_Changelog_Branch.build.Sampler.ib.tasks...
         Loading Create_Release_Git_Tag.build.Sampler.ib.tasks...
         Loading DeployAll.PSDeploy.build.Sampler.ib.tasks...
         Loading DscResource.Test.build.Sampler.ib.tasks...
         Loading generateHelp.PlatyPS.build.Sampler.ib.tasks...
         Loading GuestConfig.build.Sampler.ib.tasks...
         Loading Invoke-Pester.pester.build.Sampler.ib.tasks...
         Loading JaCoCo.coverage.build.Sampler.ib.tasks...
         Loading release.module.build.Sampler.ib.tasks...
         Loading Set-SamplerTaskVariable...
Importing tasks from module Sampler.DscPipeline
         Loading CompileDatumRsop.build.Sampler.DscPipeline.ib.tasks...
         Loading CompileRootConfiguration.build.Sampler.DscPipeline.ib.tasks...
         Loading CompileRootMetaMof.build.Sampler.DscPipeline.ib.tasks...
         Loading CompressArtifactCollections.build.Sampler.DscPipeline.ib.tasks...
         Loading CompressModulesWithChecksum.build.Sampler.DscPipeline.ib.tasks...
         Loading LoadDatumConfigData.build.Sampler.DscPipeline.ib.tasks...
         Loading NewMofChecksums.build.Sampler.DscPipeline.ib.tasks...
         Loading TestBuildAcceptance.build.Sampler.DscPipeline.ib.tasks...
         Loading TestConfigData.build.Sampler.DscPipeline.ib.tasks...
         Loading TestDscResources.build.Sampler.DscPipeline.ib.tasks...
Adding Workflow from configuration:
  +-> pack
  +-> init
  +-> build
  +-> .
[build] Executing requested workflow: build
Build build C:\BuildWorker1\_work\2\s\build.ps1
Redefined task '.'.

===============================================================================
                        INIT

-------------------------------------------------------------------------------
  /build/Init
  C:\BuildWorker1\_work\2\s\build.ps1:331

Done /build/Init 00:00:00.2126217

===============================================================================
                        CLEAN
Deleting the content of the Build Output folder, except ./modules
-------------------------------------------------------------------------------
  /build/Clean
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler\0.116.1\tasks\Clean.ModuleBuilder.build.ps1:16

Removing C:\BuildWorker1\_work\2\s\output\* excluding RequiredModules
Done /build/Clean 00:00:00.0511637

===============================================================================
                        LOADDATUMCONFIGDATA

-------------------------------------------------------------------------------
  /build/LoadDatumConfigData
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\LoadDatumConfigData.build.ps1:30

Loading Datum Definition from 'C:\BuildWorker1\_work\2\s\source\Datum.yml'
Done /build/LoadDatumConfigData 00:00:02.8034676

===============================================================================
                        TESTCONFIGDATA

-------------------------------------------------------------------------------
  /build/TestConfigData
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\TestConfigData.build.ps1:43

        Project Name               = 'DscWorkshop'
        Source Path                = 'source'
        Output Directory           = 'C:\BuildWorker1\_work\2\s\output'
        Release Notes path         = 'C:\BuildWorker1\_work\2\s\output\ReleaseNotes.md'
        Built Module Subdirectory  = 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap'
        Module Manifest Path (src) = 'C:\BuildWorker1\_work\2\s\source\DscWorkshop.psd1'
        Module Version             = '0.4'

        Pester Output Folder    = 'C:\BuildWorker1\_work\2\s\output\testResults
Creating folder C:\BuildWorker1\_work\2\s\output\testResults
Config Data Pester Scripts = [C:\BuildWorker1\_work\2\s\tests\ConfigData]
TestResultsPath is: C:\BuildWorker1\_work\2\s\output\testResults\IntegrationTestResults.xml
OutputDirectory is: C:\BuildWorker1\_work\2\s\output\testResults
Pester v5.3.3

Starting discovery in 2 files.
DSC Composite / Resource Module Table for 'DscConfig.Demo' with version 'NA'
-------------------------------------

DscResourceFileName                      DscResourceName              VersionInCompositeResource VersionInPSDependFile
-------------------                      ---------------              -------------------------- ---------------------
DscLcmController.schema.psm1             ComputerManagementDsc                                   8.5.0
SmbShares.schema.psm1                    ComputerManagementDsc                                   8.5.0
SecurityBase.schema.psm1                 ComputerManagementDsc                                   8.5.0
WindowsEventLogs.schema.psm1             ComputerManagementDsc                                   8.5.0
ComputerSettings.schema.psm1             ComputerManagementDsc                                   8.5.0
FilesAndFolders.schema.psm1              FileSystemDsc                                           1.1.1
DscDiagnostic.schema.psm1                JeaDsc                                                  0.7.2
NetworkIpConfiguration.schema.psm1       NetworkingDsc                                           9.0.0
SecurityBase.schema.psm1                 SecurityPolicyDsc                                       2.10.0.0
Scripts.schema.psm1                      xPSDesiredStateConfiguration                            9.1.0
WindowsServices.schema.psm1              xPSDesiredStateConfiguration                            9.1.0
SoftwarePackages.schema.psm1             xPSDesiredStateConfiguration                            9.1.0
SecurityBase.schema.psm1                 xPSDesiredStateConfiguration                            9.1.0
RegistryValues.schema.psm1               xPSDesiredStateConfiguration                            9.1.0
DscLcmMaintenanceWindows.schema.psm1     xPSDesiredStateConfiguration                            9.1.0
DscTagging.schema.psm1                   xPSDesiredStateConfiguration                            9.1.0
DscLcmController.schema.psm1             xPSDesiredStateConfiguration                            9.1.0
ConfigurationBase.schema.psm1            xPSDesiredStateConfiguration                            9.1.0
LocalUsers.schema.psm1                   xPSDesiredStateConfiguration                            9.1.0
NetworkIpConfiguration.schema.psm1       xPSDesiredStateConfiguration                            9.1.0
EnvironmentVariables.schema.psm1         xPSDesiredStateConfiguration                            9.1.0
LocalGroups.schema.psm1                  xPSDesiredStateConfiguration                            9.1.0
WebVirtualDirectories.schema.psm1        xWebAdministration                                      3.3.0
WebApplicationPools.schema.psm1          xWebAdministration                                      3.3.0
Websites.schema.psm1                     xWebAdministration                                      3.3.0
WebApplications.schema.psm1              xWebAdministration                                      3.3.0
WebConfigProperties.schema.psm1          xWebAdministration                                      3.3.0
WebConfigPropertyCollections.schema.psm1 xWebAdministration                                      3.3.0



-------------------------------------
Discovery found 130 tests in 1.92s.
Filter 'Tag' set to ('Integration').
Filters selected 130 tests to run.
Running tests.

Running tests from 'CompositeResources.Tests.ps1'
Describing Resources matching between Composite Resources and PSDepend file
 Context Composite Resources import correct DSC Resources
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 466ms (188ms|278ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 10ms (7ms|3ms)
   [+] DSC Resource Module 'JeaDsc' is defined in 'RequiredModules.psd1' 12ms (9ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 79ms (72ms|7ms)
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 30ms (9ms|21ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 11ms (7ms|5ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 10ms (6ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 8ms (5ms|3ms)
   [+] DSC Resource Module 'FileSystemDsc' is defined in 'RequiredModules.psd1' 13ms (8ms|5ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 13ms (8ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 12ms (7ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 15ms (6ms|9ms)
   [+] DSC Resource Module 'NetworkingDsc' is defined in 'RequiredModules.psd1' 19ms (14ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 227ms (6ms|221ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 13ms (8ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 23ms (10ms|13ms)
   [+] DSC Resource Module 'SecurityPolicyDsc' is defined in 'RequiredModules.psd1' 11ms (7ms|4ms)
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 10ms (6ms|4ms)
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 11ms (7ms|4ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 19ms (10ms|8ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 13ms (6ms|7ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 13ms (9ms|4ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 11ms (6ms|4ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 13ms (9ms|4ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 19ms (13ms|6ms)
   [+] DSC Resource Module 'xWebAdministration' is defined in 'RequiredModules.psd1' 17ms (12ms|4ms)
   [+] DSC Resource Module 'ComputerManagementDsc' is defined in 'RequiredModules.psd1' 15ms (9ms|6ms)
   [+] DSC Resource Module 'xPSDesiredStateConfiguration' is defined in 'RequiredModules.psd1' 11ms (7ms|4ms)
   [+] Version of 'ComputerManagementDsc' in 'ComputerSettings.schema.psm1' is equal to version in 'RequiredModules.psd1' 10ms (5ms|5ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'ConfigurationBase.schema.psm1' is equal to version in 'RequiredModules.psd1' 10ms (3ms|7ms)
   [+] Version of 'JeaDsc' in 'DscDiagnostic.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (4ms|5ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'DscLcmController.schema.psm1' is equal to version in 'RequiredModules.psd1' 18ms (3ms|15ms)
   [+] Version of 'ComputerManagementDsc' in 'DscLcmController.schema.psm1' is equal to version in 'RequiredModules.psd1' 206ms (200ms|6ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'DscLcmMaintenanceWindows.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'DscTagging.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'EnvironmentVariables.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'FileSystemDsc' in 'FilesAndFolders.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'LocalGroups.schema.psm1' is equal to version in 'RequiredModules.psd1' 28ms (24ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'LocalUsers.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'NetworkIpConfiguration.schema.psm1' is equal to version in 'RequiredModules.psd1' 17ms (13ms|4ms)
   [+] Version of 'NetworkingDsc' in 'NetworkIpConfiguration.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'RegistryValues.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'Scripts.schema.psm1' is equal to version in 'RequiredModules.psd1' 10ms (6ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'SecurityBase.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'SecurityPolicyDsc' in 'SecurityBase.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'ComputerManagementDsc' in 'SecurityBase.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (3ms|5ms)
   [+] Version of 'ComputerManagementDsc' in 'SmbShares.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'SoftwarePackages.schema.psm1' is equal to version in 'RequiredModules.psd1' 9ms (3ms|6ms)
   [+] Version of 'xWebAdministration' in 'WebApplicationPools.schema.psm1' is equal to version in 'RequiredModules.psd1' 17ms (14ms|3ms)
   [+] Version of 'xWebAdministration' in 'WebApplications.schema.psm1' is equal to version in 'RequiredModules.psd1' 31ms (26ms|5ms)
   [+] Version of 'xWebAdministration' in 'WebConfigProperties.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (4ms|4ms)
   [+] Version of 'xWebAdministration' in 'WebConfigPropertyCollections.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (3ms|5ms)
   [+] Version of 'xWebAdministration' in 'Websites.schema.psm1' is equal to version in 'RequiredModules.psd1' 8ms (3ms|4ms)
   [+] Version of 'xWebAdministration' in 'WebVirtualDirectories.schema.psm1' is equal to version in 'RequiredModules.psd1' 10ms (7ms|3ms)
   [+] Version of 'ComputerManagementDsc' in 'WindowsEventLogs.schema.psm1' is equal to version in 'RequiredModules.psd1' 9ms (4ms|4ms)
   [+] Version of 'xPSDesiredStateConfiguration' in 'WindowsServices.schema.psm1' is equal to version in 'RequiredModules.psd1' 7ms (3ms|5ms)

Running tests from 'ConfigData.Tests.ps1'
Describing Validate All Definition Files
  [+] 'DSCFile01.yml' is a valid yaml 156ms (137ms|19ms)
  [+] 'DSCWeb01.yml' is a valid yaml 80ms (76ms|3ms)
  [+] 'DSCFile03.yml' is a valid yaml 46ms (38ms|8ms)
  [+] 'DSCWeb03.yml' is a valid yaml 37ms (35ms|2ms)
  [+] 'DSCFile02.yml' is a valid yaml 56ms (54ms|2ms)
  [+] 'DSCWeb02.yml' is a valid yaml 48ms (44ms|4ms)
  [+] 'DscLcm.yml' is a valid yaml 115ms (110ms|5ms)
  [+] 'Security.yml' is a valid yaml 26ms (23ms|3ms)
  [+] 'Server.yml' is a valid yaml 69ms (48ms|21ms)
  [+] 'Dev.yml' is a valid yaml 29ms (27ms|2ms)
  [+] 'Prod.yml' is a valid yaml 20ms (18ms|2ms)
  [+] 'Test.yml' is a valid yaml 19ms (17ms|2ms)
  [+] 'Domain.yml' is a valid yaml 16ms (14ms|2ms)
  [+] 'Frankfurt.yml' is a valid yaml 30ms (23ms|7ms)
  [+] 'London.yml' is a valid yaml 25ms (22ms|3ms)
  [+] 'Singapore.yml' is a valid yaml 23ms (20ms|3ms)
  [+] 'Tokio.yml' is a valid yaml 37ms (33ms|3ms)
  [+] 'DomainController.yml' is a valid yaml 29ms (27ms|2ms)
  [+] 'FileServer.yml' is a valid yaml 118ms (115ms|2ms)
  [+] 'WebServer.yml' is a valid yaml 135ms (131ms|3ms)
  [+] 'Datum.yml' is a valid yaml 74ms (72ms|2ms)

Describing Datum Tree Definition
  [+] Exists in source Folder 98ms (86ms|12ms)
  [+] Is Valid Yaml 67ms (64ms|3ms)
  [+] 'Get-FilteredConfigurationData' returned data 13ms (11ms|2ms)

Describing Node Definition Files
 Context Testing for conflicts / duplicate data
   [+] Should not have duplicate node names 26ms (5ms|20ms)
  [+] 'DSCFile01' has valid yaml 56ms (50ms|5ms)
  [+] 'DSCWeb01' has valid yaml 42ms (40ms|2ms)
  [+] 'DSCFile03' has valid yaml 45ms (43ms|2ms)
  [+] 'DSCWeb03' has valid yaml 34ms (26ms|7ms)
  [+] 'DSCFile02' has valid yaml 36ms (34ms|2ms)
  [+] 'DSCWeb02' has valid yaml 39ms (35ms|3ms)
  [!] 'DSCFile01' is in the right environment is skipped, because Environment for 'DSCFile01' is either not set or like '[x=*' 70ms (62ms|8ms)
  [!] 'DSCWeb01' is in the right environment is skipped, because Environment for 'DSCWeb01' is either not set or like '[x=*' 7ms (4ms|3ms)
  [!] 'DSCFile03' is in the right environment is skipped, because Environment for 'DSCFile03' is either not set or like '[x=*' 7ms (5ms|2ms)
  [!] 'DSCWeb03' is in the right environment is skipped, because Environment for 'DSCWeb03' is either not set or like '[x=*' 14ms (7ms|7ms)
  [!] 'DSCFile02' is in the right environment is skipped, because Environment for 'DSCFile02' is either not set or like '[x=*' 11ms (8ms|3ms)
  [!] 'DSCWeb02' is in the right environment is skipped, because Environment for 'DSCWeb02' is either not set or like '[x=*' 19ms (10ms|9ms)
  [+] Location of 'DSCFile01' is 'Frankfurt' and does exist 15ms (11ms|5ms)
  [+] Location of 'DSCWeb01' is 'Singapore' and does exist 7ms (4ms|3ms)
  [+] Location of 'DSCFile03' is 'Frankfurt' and does exist 16ms (8ms|8ms)
  [+] Location of 'DSCWeb03' is 'Singapore' and does exist 6ms (4ms|2ms)
  [+] Location of 'DSCFile02' is 'Frankfurt' and does exist 7ms (5ms|2ms)
  [+] Location of 'DSCWeb02' is 'Singapore' and does exist 12ms (9ms|3ms)
  [!] Environment of 'DSCFile01' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCFile01' is either not set or like '[x=*' 27ms (17ms|10ms)
  [!] Environment of 'DSCWeb01' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCWeb01' is either not set or like '[x=*' 26ms (15ms|11ms)
  [!] Environment of 'DSCFile03' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCFile03' is either not set or like '[x=*' 57ms (47ms|10ms)
  [!] Environment of 'DSCWeb03' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCWeb03' is either not set or like '[x=*' 26ms (18ms|8ms)
  [!] Environment of 'DSCFile02' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCFile02' is either not set or like '[x=*' 19ms (10ms|9ms)
  [!] Environment of 'DSCWeb02' is '[x={ $File.Directory.BaseName } =]' and does exist is skipped, because Environment for 'DSCWeb02' is either not set or like '[x=*' 12ms (8ms|4ms)
  [+] Role of 'DSCFile01' is 'FileServer' and does exist 8ms (6ms|2ms)
  [+] Role of 'DSCWeb01' is 'WebServer' and does exist 27ms (6ms|21ms)
  [+] Role of 'DSCFile03' is 'FileServer' and does exist 7ms (4ms|4ms)
  [+] Role of 'DSCWeb03' is 'WebServer' and does exist 7ms (5ms|2ms)
  [+] Role of 'DSCFile02' is 'FileServer' and does exist 7ms (4ms|3ms)
  [+] Role of 'DSCWeb02' is 'WebServer' and does exist 17ms (12ms|4ms)
  [+] Baseline of 'DSCFile01' is 'Server' and does exist 9ms (5ms|4ms)
  [+] Baseline of 'DSCWeb01' is 'Server' and does exist 10ms (6ms|4ms)
  [+] Baseline of 'DSCFile03' is 'Server' and does exist 9ms (5ms|4ms)
  [+] Baseline of 'DSCWeb03' is 'Server' and does exist 22ms (19ms|4ms)
  [+] Baseline of 'DSCFile02' is 'Server' and does exist 13ms (4ms|9ms)
  [+] Baseline of 'DSCWeb02' is 'Server' and does exist 10ms (7ms|3ms)
 Describing Roles Definition Files
   [+] C:\BuildWorker1\_work\2\s\source\Roles\FileServer.yml has valid yaml 96ms (87ms|9ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\WebServer.yml has valid yaml 120ms (117ms|2ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\FileServer.yml has valid yaml 42ms (40ms|2ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\WebServer.yml has valid yaml 158ms (154ms|4ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\FileServer.yml has valid yaml 90ms (87ms|2ms)
   [+] C:\BuildWorker1\_work\2\s\source\Roles\WebServer.yml has valid yaml 148ms (144ms|4ms)
 Describing Role Composition
   [+] DSCFile01 has a valid Configurations Setting (!$null) 1.89s (1.87s|17ms)
   [+] DSCWeb01 has a valid Configurations Setting (!$null) 821ms (818ms|4ms)
   [+] DSCFile03 has a valid Configurations Setting (!$null) 552ms (550ms|2ms)
   [+] DSCWeb03 has a valid Configurations Setting (!$null) 578ms (575ms|4ms)
   [+] DSCFile02 has a valid Configurations Setting (!$null) 651ms (639ms|12ms)
   [+] DSCWeb02 has a valid Configurations Setting (!$null) 515ms (512ms|4ms)
   [+] No duplicate IP addresses should be used 31ms (28ms|2ms)
Tests completed in 18.32s
Tests Passed: 118, Failed: 0, Skipped: 12 NotRun: 0
Done /build/TestConfigData 00:00:23.1797650

===============================================================================
                        COMPILEDATUMRSOP

-------------------------------------------------------------------------------
  /build/CompileDatumRsop
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\CompileDatumRsop.build.ps1:43

        Project Name               = 'DscWorkshop'
        Source Path                = 'source'
        Output Directory           = 'C:\BuildWorker1\_work\2\s\output'
        Release Notes path         = 'C:\BuildWorker1\_work\2\s\output\ReleaseNotes.md'                                         Built Module Subdirectory  = 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap'                                      Module Manifest Path (src) = 'C:\BuildWorker1\_work\2\s\source\DscWorkshop.psd1'                                        Module Version             = '0.4'                                                                                                                                                                                                      Generating RSOP output for 6 nodes.                                                                                             Building RSOP for DSCFile01...                                                                                          Building RSOP for DSCWeb01...                                                                                           Building RSOP for DSCFile03...                                                                                          Building RSOP for DSCWeb03...                                                                                           Building RSOP for DSCFile02...                                                                                          Building RSOP for DSCWeb02...                                                                                   Done /build/CompileDatumRsop 00:00:40.2738267                                                                                                                                                                                                   ===============================================================================                                                                 TESTDSCRESOURCES                                                                                                                                                                                                        -------------------------------------------------------------------------------                                           /build/TestDscResources                                                                                                 C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\TestDscResources.build.ps1:1                                                                                                                                 Not implemented yet. We don't separate Composites from Resources or build dependencies anymore.                         Done /build/TestDscResources 00:00:00.0473411                                                                                                                                                                                                   ===============================================================================                                                                 COMPILEROOTCONFIGURATION                                                                                                                                                                                                -------------------------------------------------------------------------------                                           /build/CompileRootConfiguration                                                                                         C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\CompileRootConfiguration.build.ps1:44                                                                                                                                Project Name               = 'DscWorkshop'                                                                              Source Path                = 'source'                                                                                   Output Directory           = 'C:\BuildWorker1\_work\2\s\output'                                                         Release Notes path         = 'C:\BuildWorker1\_work\2\s\output\ReleaseNotes.md'                                         Built Module Subdirectory  = 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap'                                      Module Manifest Path (src) = 'C:\BuildWorker1\_work\2\s\source\DscWorkshop.psd1'                                        Module Version             = '0.4'                                                                                                                                                                                                      Reading DSC Resource metadata for supporting CIM based DSC parameters...                                                Done                                                                                                                    Transcript started, output file is output\Logs\CompileRootConfiguration.log                                                                                                                                                                     Did not find 'RootConfiguration.ps1' and 'CompileRootConfiguration.ps1' in 'source', using the ones in 'Sampler.DscPipeline'                                                                                                                    RootConfiguration will import these composite resource modules as defined in 'build.yaml':                                      - PSDesiredStateConfiguration                                                                                           - DscConfig.Demo                                                                                                                                                                                                                                                                                                                                                ---------------------------------------------------------------------------                                             DSCFile02 : DSCFile02 : MOF__ NA                                                                                            DSCFile02 : FileServer ::> FilesAndFolders .....................................................OK                      DSCFile02 : FileServer ::> RegistryValues ......................................................OK                      DSCFile02 : FileServer ::> SecurityBase ........................................................OK                      DSCFile02 : FileServer ::> WindowsFeatures .....................................................OK                      DSCFile02 : FileServer ::> ComputerSettings ....................................................OK                      DSCFile02 : FileServer ::> NetworkIpConfiguration ..............................................OK                      DSCFile02 : FileServer ::> WindowsEventLogs ....................................................OK                      DSCFile02 : FileServer ::> DscLcmController ....................................................OK                      DSCFile02 : FileServer ::> DscLcmMaintenanceWindows ............................................OK                      DSCFile02 : FileServer ::> DscTagging ..........................................................OK                      DSCFile02 : FileServer ::> DscDiagnostic .......................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCFile01 : DSCFile01 : MOF__ NA                                                                                            DSCFile01 : FileServer ::> FilesAndFolders .....................................................OK                      DSCFile01 : FileServer ::> RegistryValues ......................................................OK                      DSCFile01 : FileServer ::> SecurityBase ........................................................OK                      DSCFile01 : FileServer ::> WindowsFeatures .....................................................OK                      DSCFile01 : FileServer ::> ComputerSettings ....................................................OK                      DSCFile01 : FileServer ::> NetworkIpConfiguration ..............................................OK                      DSCFile01 : FileServer ::> WindowsEventLogs ....................................................OK                      DSCFile01 : FileServer ::> DscLcmController ....................................................OK                      DSCFile01 : FileServer ::> DscLcmMaintenanceWindows ............................................OK                      DSCFile01 : FileServer ::> DscTagging ..........................................................OK                      DSCFile01 : FileServer ::> DscDiagnostic .......................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCFile03 : DSCFile03 : MOF__ NA                                                                                            DSCFile03 : FileServer ::> FilesAndFolders .....................................................OK                      DSCFile03 : FileServer ::> RegistryValues ......................................................OK                      DSCFile03 : FileServer ::> SecurityBase ........................................................OK                      DSCFile03 : FileServer ::> WindowsFeatures .....................................................OK                      DSCFile03 : FileServer ::> ComputerSettings ....................................................OK                      DSCFile03 : FileServer ::> NetworkIpConfiguration ..............................................OK                      DSCFile03 : FileServer ::> WindowsEventLogs ....................................................OK                      DSCFile03 : FileServer ::> DscLcmController ....................................................OK                      DSCFile03 : FileServer ::> DscLcmMaintenanceWindows ............................................OK                      DSCFile03 : FileServer ::> DscTagging ..........................................................OK                      DSCFile03 : FileServer ::> DscDiagnostic .......................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCWeb03 : DSCWeb03 : MOF__ NA                                                                                              DSCWeb03 : WebServer ::> FilesAndFolders .......................................................OK                      DSCWeb03 : WebServer ::> WindowsServices .......................................................OK                      DSCWeb03 : WebServer ::> RegistryValues ........................................................OK                      DSCWeb03 : WebServer ::> WebApplicationPools ...................................................OK                      DSCWeb03 : WebServer ::> WebApplications .......................................................OK                      DSCWeb03 : WebServer ::> SecurityBase ..........................................................OK                      DSCWeb03 : WebServer ::> WindowsFeatures .......................................................OK                      DSCWeb03 : WebServer ::> ComputerSettings ......................................................OK                      DSCWeb03 : WebServer ::> NetworkIpConfiguration ................................................OK                      DSCWeb03 : WebServer ::> WindowsEventLogs ......................................................OK                      DSCWeb03 : WebServer ::> DscLcmController ......................................................OK                      DSCWeb03 : WebServer ::> DscLcmMaintenanceWindows ..............................................OK                      DSCWeb03 : WebServer ::> DscTagging ............................................................OK                      DSCWeb03 : WebServer ::> DscDiagnostic .........................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCWeb01 : DSCWeb01 : MOF__ NA                                                                                              DSCWeb01 : WebServer ::> FilesAndFolders .......................................................OK                      DSCWeb01 : WebServer ::> WindowsServices .......................................................OK                      DSCWeb01 : WebServer ::> RegistryValues ........................................................OK                      DSCWeb01 : WebServer ::> WebApplicationPools ...................................................OK                      DSCWeb01 : WebServer ::> WebApplications .......................................................OK                      DSCWeb01 : WebServer ::> SecurityBase ..........................................................OK                      DSCWeb01 : WebServer ::> WindowsFeatures .......................................................OK                      DSCWeb01 : WebServer ::> ComputerSettings ......................................................OK                      DSCWeb01 : WebServer ::> NetworkIpConfiguration ................................................OK                      DSCWeb01 : WebServer ::> WindowsEventLogs ......................................................OK                      DSCWeb01 : WebServer ::> DscLcmController ......................................................OK                      DSCWeb01 : WebServer ::> DscLcmMaintenanceWindows ..............................................OK                      DSCWeb01 : WebServer ::> DscTagging ............................................................OK                      DSCWeb01 : WebServer ::> DscDiagnostic .........................................................OK                                                                                                                                          ---------------------------------------------------------------------------                                             DSCWeb02 : DSCWeb02 : MOF__ NA                                                                                              DSCWeb02 : WebServer ::> FilesAndFolders .......................................................OK                      DSCWeb02 : WebServer ::> WindowsServices .......................................................OK                      DSCWeb02 : WebServer ::> RegistryValues ........................................................OK                      DSCWeb02 : WebServer ::> WebApplicationPools ...................................................OK                      DSCWeb02 : WebServer ::> WebApplications .......................................................OK                      DSCWeb02 : WebServer ::> SecurityBase ..........................................................OK                      DSCWeb02 : WebServer ::> WindowsFeatures .......................................................OK                      DSCWeb02 : WebServer ::> ComputerSettings ......................................................OK                      DSCWeb02 : WebServer ::> NetworkIpConfiguration ................................................OK
    DSCWeb02 : WebServer ::> WindowsEventLogs ......................................................OK
    DSCWeb02 : WebServer ::> DscLcmController ......................................................OK
    DSCWeb02 : WebServer ::> DscLcmMaintenanceWindows ..............................................OK
    DSCWeb02 : WebServer ::> DscTagging ............................................................OK
    DSCWeb02 : WebServer ::> DscDiagnostic .........................................................OK
Successfully compiled 6 MOF files
Transcript stopped, output file is C:\BuildWorker1\_work\2\s\output\Logs\CompileRootConfiguration.log
Done /build/CompileRootConfiguration 00:01:32.0067586

===============================================================================
                        COMPILEROOTMETAMOF

-------------------------------------------------------------------------------
  /build/CompileRootMetaMof
  C:\BuildWorker1\_work\2\s\output\RequiredModules\Sampler.DscPipeline\0.2.0\tasks\CompileRootMetaMof.build.ps1:32

        Project Name               = 'DscWorkshop'
        Source Path                = 'source'
        Output Directory           = 'C:\BuildWorker1\_work\2\s\output'
        Release Notes path         = 'C:\BuildWorker1\_work\2\s\output\ReleaseNotes.md'
        Built Module Subdirectory  = 'C:\BuildWorker1\_work\2\s\output\AvoidPSPathOverlap'
        Module Manifest Path (src) = 'C:\BuildWorker1\_work\2\s\source\DscWorkshop.psd1'
        Module Version             = '0.4'


Did not find 'RootMetaMof.ps1' in 'source', using 'RootMetaMof.ps1' the one in module 'Sampler.DscPipeline'
Successfully compiled 6 Meta MOF files.
Successfully compiled 6 Meta MOF files.
Done /build/CompileRootMetaMof 00:00:01.7743789
Done /build 00:02:40.4770578
Build succeeded. 9 tasks, 0 errors, 0 warnings 00:02:46.0891300

How to reproduce

Clone DscWorkshop project and deploy the hyper-v lab using the scripts in the Lab folder of the project.
In AzureDevops, when I try run the DscWorkshop pipeline, it fails with the error detailed above.

Expected behavior

Pipeline complete building the artifacts

Current behavior

Pipeline fails at build dsc artifacts step.

Suggested solution

I don't have one.

Operating system the target node is running

OsName               : Microsoft Windows Server 2022 Datacenter Evaluation
OsOperatingSystemSKU : 80
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

PowerShell version and build the target node is running

PS C:\Users\Install.contoso> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.20348.1366
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.20348.1366
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module version used

N/A
@raandree raandree self-assigned this Feb 13, 2023
@raandree
Copy link
Contributor

Hi and thanks for reporting this. I have not seen this error so far.

One thing that jumps into my eyes is the path for calling the script. When you call the script directory, do you really use .\C:\BuildWorker1\_work\2\s\build.ps1 or C:\BuildWorker1\_work\2\s\build.ps1? Having a .\ at the beginning of the path does not work for me at all.

You get the error C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1': The file 'C:\BuildWorker1\_work\2\s\Resolve-Dependency.psd1' could not be parsed as a PowerShell Data File```. How does the file Resolve-Dependency.psd1` look like. Does it show any data corruption?

@bls-droid
Copy link
Author

bls-droid commented Feb 14, 2023

I tried it again and it does not work with .\ form.
Resolve-Dependency.psd1 - had a double line: ( AllowOldPowerShellGetModule = $true ) Not sure if I got that in there somehow but it wasn't present in the copy I setup on the lab host, structure of file there looks quite different.
After removing the duplicate line it no longer lists the "could not be parsed..." error but pipeline still fails with the module not found error.

I think I see what's causing it: the versions in the RequiredModules.psd1 don't match what's available in the local nuget feed. ResolveDependency.psd1 pins it to only use the local one, whereas running from pshell falls back to PSGallery.

I was able to match the versions to what's available in local feed and it eliminates the errors, but now it's missing ( 'DscConfig.Demo' = '0.8.1-preview0002'). I will need to figure out how to add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants