Skip to content

Commit 12f8982

Browse files
committed
chore: Fix failing Authenticode validation due to ConvertFrom-Json changes.
1 parent 73d5882 commit 12f8982

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.azure-pipelines/generation-templates/workload-modules.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,18 @@ steps:
5454
$ModuleMapping.Keys | ForEach-Object {
5555
$ModuleName = $_
5656
$ModulePath = "$(System.DefaultWorkingDirectory)/src/$ModuleName/$ApiVersion"
57-
if (Test-Path $ModulePath) {
58-
$ModulePsd1 = Join-Path $ModulePath "Microsoft.Graph*.$ModuleName.psd1" -Resolve
59-
$ModulePsm1 = Join-Path $ModulePath "Microsoft.Graph*.$ModuleName.psm1" -Resolve
60-
($ModulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid"
61-
($ModulePsm1 | Get-AuthenticodeSignature).Status | Should -Be "Valid"
57+
Write-Host "Checking path: $ModulePath"
58+
$ModulePsd1 = Join-Path $ModulePath "Microsoft.Graph*.$ModuleName.psd1" -Resolve
59+
$ModulePsm1 = Join-Path $ModulePath "Microsoft.Graph*.$ModuleName.psm1" -Resolve
60+
Write-Host "Validating Authenticode Signature for $ModulePsd1"
61+
Write-Host "Validating Authenticode Signature for $ModulePsm1"
62+
if ((Test-Path $ModulePsd1) -and (Test-Path $ModulePsm1)) {
63+
$ModulePsd1AuthCodeSignature = $ModulePsd1 | Get-AuthenticodeSignature
64+
$ModulePsm1AuthCodeSignature = $ModulePsm1 | Get-AuthenticodeSignature
65+
Write-Host "Authenticode Signature for $ModulePsd1 is $($ModulePsd1AuthCodeSignature.Status)"
66+
Write-Host "Authenticode Signature for $ModulePsm1 is $($ModulePsm1AuthCodeSignature.Status)"
67+
$ModulePsd1AuthCodeSignature.Status | Should -Be "Valid"
68+
$ModulePsm1AuthCodeSignature.Status | Should -Be "Valid"
6269
}
6370
}
6471
}

0 commit comments

Comments
 (0)