Open jaswant-dnv opened 2 weeks ago
Hi @jaswant-dnv ,
Thanks for raising the issue , we will investiage and provide the update . thankyou !
Hi @jaswant-dnv - After observing from your above description, I can figure out that- The error occurs because the IMAGE_FOLDER environment variable is null, which is causing Join-Path to fail. Please ensure that IMAGE_FOLDER is set correctly before calling Join-Path. For that, You can try to add a below check in InstallHelpers.ps1 before line 224 to verify IMAGE_FOLDER is not empty.
if (-not $env:IMAGE_FOLDER) {
throw "Environment variable IMAGE_FOLDER is not set or is empty."
}
Also, try to review and update your build agent's configuration to ensure all necessary environment variables are properly set.
Description
Windows image build fails
[debug]Agent environment resources - Disk: / Available 30899.32 MB out of 85160.55 MB, Memory: Used 1953.00 MB out of 15981.00 MB, CPU: Usage 0.50%
==> azure-arm.image: Join-Path : Cannot bind argument to parameter 'Path' because it is null. ==> azure-arm.image: At C:\Program Files\WindowsPowerShell\Modules\ImageHelpers\InstallHelpers.ps1:224 char:30 ==> azure-arm.image: + $toolsetPath = Join-Path $env:IMAGE_FOLDER "toolset.json" ==> azure-arm.image: +
~~~~~ ==> azure-arm.image: + CategoryInfo : InvalidData: (:) [Join-Path], ParentContainsErrorRecordException ==> azure-arm.image: + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom ==> azure-arm.image: mand ==> azure-arm.image:Platforms affected
Runner images affected
Image version and build link
20241021.1.0
Is it regression?
N/A
Expected behavior
Build pipeline completes successfully.
Actual behavior
[debug]Agent environment resources - Disk: / Available 30899.32 MB out of 85160.55 MB, Memory: Used 1953.00 MB out of 15981.00 MB, CPU: Usage 0.50%
==> azure-arm.image: Join-Path : Cannot bind argument to parameter 'Path' because it is null. ==> azure-arm.image: At C:\Program Files\WindowsPowerShell\Modules\ImageHelpers\InstallHelpers.ps1:224 char:30 ==> azure-arm.image: + $toolsetPath = Join-Path $env:IMAGE_FOLDER "toolset.json" ==> azure-arm.image: +
~~~~~ ==> azure-arm.image: + CategoryInfo : InvalidData: (:) [Join-Path], ParentContainsErrorRecordException ==> azure-arm.image: + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom ==> azure-arm.image: mand ==> azure-arm.image:Repro steps
rerun pipeline.