Skip to content

Commit

Permalink
azure-piplines: Add extra verification step after signing (#1791)
Browse files Browse the repository at this point in the history
* Verify signature file was created after sign step

* Add comment
  • Loading branch information
alexweininger authored Sep 13, 2024
1 parent 8dbb708 commit 89f4c59
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions azure-pipelines/templates/sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,23 @@ steps:
condition: eq(variables['signprojExists'], True)
displayName: "\U0001F449 Generate extension manifest"

# this task will pass even if signing fails, so we follow it up with a check to see if the signature file was created
- task: DotNetCoreCLI@2
condition: eq(variables['signprojExists'], True)
displayName: "\U0001F449 Sign with MSBuild"
inputs:
command: 'build'
projects: $(Build.SourcesDirectory)/.azure-pipelines/SignExtension.signproj

- pwsh: |
$filePath = "extension.signature.p7s"
if (-Not (Test-Path $filePath)) {
Write-Error "The file '$filePath' does not exist."
exit 1
}
Write-Output "The file '$filePath' exists."
exit 0
displayName: "\U0001F449 Verify extension.signature.p7s file was created"
condition: eq(variables['signprojExists'], True)

0 comments on commit 89f4c59

Please sign in to comment.