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

CI Build Failing - Task 3 Exercise 2 #76

Open
nawijesi opened this issue Jul 16, 2020 · 1 comment
Open

CI Build Failing - Task 3 Exercise 2 #76

nawijesi opened this issue Jul 16, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@nawijesi
Copy link

nawijesi commented Jul 16, 2020

I’m currently trying to do Task 3 – Exercise 2 in the DSC Workshop linked: https://github.com/dsccommunity/DscWorkshop/blob/dev/Exercises/Task3/Exercise2.md

After having followed all the steps and running the pipeline on the agent the build step is failing

This is the error I’m getting:

/./TestConfigData 
D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1:1 
testResultsPath is: D:\a\1\s\DSC\BuildOutput\IntegrationTestResults.xml 
testsPath is: D:\a\1\s\DSC\Tests 
BuildOutput is: D:\a\1\s\DSC\BuildOutput 
[-] Error occurred in test script 'D:\a\1\s\DSC\Tests\Acceptance\TestMofFiles.Tests.ps1' 0ms 
ParameterBindingValidationException: Cannot bind argument to parameter 'InputObject' because it is null. 
at Get-DatumNodesRecursive, D:\a\1\s\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 38 
at Get-DatumNodesRecursive, D:\a\1\s\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 41 
at Get-FilteredConfigurationData, D:\a\1\s\DSC\Build\DscHelpers\Get-FilteredConfigurationData.ps1: line 15 
at <ScriptBlock>, D:\a\1\s\DSC\Tests\Acceptance\TestMofFiles.Tests.ps1: line 8 
at <ScriptBlock>, D:\a\1\s\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1111 
at Invoke-Pester<End>, D:\a\1\s\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1137 
at <ScriptBlock>, D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1: line 17 
at *Task, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 530 
at *Task, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 503 
at <ScriptBlock><End>, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 690 
at <ScriptBlock>, D:\a\1\s\DSC\Build.ps1: line 129 
at <ScriptBlock>, D:\a\_temp\edf14524-3e7e-4d1a-8a47-18308a597759.ps1: line 3 
[-] Error occurred in test script 'D:\a\1\s\DSC\Tests\ConfigData\ConfigData.Tests.ps1' 0ms 
ParameterBindingValidationException: Cannot bind argument to parameter 'InputObject' because it is null. 
at Get-DatumNodesRecursive, D:\a\1\s\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 38 
at Get-DatumNodesRecursive, D:\a\1\s\DSC\Build\DscHelpers\Get-DatumNodesRecursive.ps1: line 41 
at Get-FilteredConfigurationData, D:\a\1\s\DSC\Build\DscHelpers\Get-FilteredConfigurationData.ps1: line 15 
at <ScriptBlock>, D:\a\1\s\DSC\Tests\ConfigData\ConfigData.Tests.ps1: line 8 
at <ScriptBlock>, D:\a\1\s\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1111 
at Invoke-Pester<End>, D:\a\1\s\DSC\BuildOutput\Modules\Pester\4.10.1\Pester.psm1: line 1137 
at <ScriptBlock>, D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1: line 17 
at *Task, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 530 
at *Task, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 503 
at <ScriptBlock><End>, D:\a\1\s\DSC\BuildOutput\Modules\InvokeBuild\5.6.0\Invoke-Build.ps1: line 690 
at <ScriptBlock>, D:\a\1\s\DSC\Build.ps1: line 129 
at <ScriptBlock>, D:\a\_temp\edf14524-3e7e-4d1a-8a47-18308a597759.ps1: line 3 
Tests completed in 3.17s 
Tests Passed: 0, Failed: 2, Skipped: 0, Pending: 0, Inconclusive: 0 
ERROR: Assertion failed. 
At D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1:19 char:5 
+ assert ($testResults.FailedCount -eq 0) 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
At D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1:1 char:1 
+ task TestConfigData { 
+ ~~~~~~~~~~~~~~~~~~~~~ 
At D:\a\1\s\DSC\Build.ps1:156 char:5 
+ task . Init, 
+ ~~~~~~~~~~~~ 
Build FAILED. 8 tasks, 1 errors, 0 warnings 00:03:23.4742325 
assert : Assertion failed. 
At D:\a\1\s\DSC\Build\Tasks\TestConfigData.ps1:19 char:5 
+ assert ($testResults.FailedCount -eq 0) 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+ CategoryInfo : InvalidOperation: (:) [Assert-Build], Exception 
+ FullyQualifiedErrorId : Assert-Build 
##[error]PowerShell exited with code '1'. 
Finishing: Execute build.ps1 

I’ve played around and tweaked settings but still get the same error (I am running on dev branch), here are the current settings that the build is running on (exact as tutorial):

image

pic

Just wondering if this is something you are aware about and may already have a solution for.

@nawijesi nawijesi changed the title CI Build Failing CI Build Failing - Task 3 Exercise 2 Jul 16, 2020
@raandree raandree self-assigned this Jul 22, 2020
@raandree raandree added the bug Something isn't working label Jul 22, 2020
@raandree
Copy link
Contributor

Sorry for the inconvenience, that was my fault. Can you give it another try? I have fixed that issue in d3f0e69.

BTW, you can run the build also locally without the pipeline for better troubleshooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants