Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Enabling Code Sign Validation through 1ES template #95

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ extends:
tsa:
enabled: true
configFile: $(System.DefaultWorkingDirectory)\build\tsaoptions-v2.json
codeSignValidation:
break: true
targetPathExclusionPattern: \"**\*.xml\"
${{ if not(and(eq(variables['Build.Reason'], 'IndividualCI'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
policyFile: $(MBSIGN_APPFOLDER)\CSVTestSignPolicy.xml
pool:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
os: windows
stages:
- template: /build/stages/build.yml@self
- template: /build/stages/upload.yml@self
- template: /build/stages/build.yml@self
6 changes: 1 addition & 5 deletions build/stages/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ stages:
targetPath: '$(Build.ArtifactStagingDirectory)/logs'
artifactName: logs
sbomEnabled: false # SBOM only enabled for vsix
codeSignValidationEnabled: false
- output: pipelineArtifact
displayName: 'Artifacts'
targetPath: '$(Build.ArtifactStagingDirectory)/package' # vsix will only get published if "CopySignedVsixToPackageDir" target runs in Merq.Vsix.csproj
artifactName: package
- output: pipelineArtifact
displayName: 'Symbols'
targetPath: '$(Build.ArtifactStagingDirectory)/artifacts'
artifactName: symbols
sbomEnabled: false # SBOM only enabled for vsix
steps:
- checkout: self
clean: true
Expand Down
49 changes: 0 additions & 49 deletions build/stages/upload.yml

This file was deleted.

39 changes: 17 additions & 22 deletions src/Vsix/Merq.Vsix/Merq.Vsix.props
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\Merq.props" />

<PropertyGroup>
<VerifyTargetVersion>false</VerifyTargetVersion>
<BypassVsixValidation Condition="'$(CI)' == 'true'">true</BypassVsixValidation>

<UseCodebase>true</UseCodebase>
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>

<ExtensionInstallationFolder>Merq</ExtensionInstallationFolder>
<IsProductComponent>true</IsProductComponent>
</PropertyGroup>

<PropertyGroup Label="Artifacts SDK">
<ArtifactsPath Condition="'$(BUILD_ARTIFACTSTAGINGDIRECTORY)' != ''">$(BUILD_ARTIFACTSTAGINGDIRECTORY)/artifacts</ArtifactsPath>
<DefaultArtifactsFileMatch>Merq*dll Merq*pdb</DefaultArtifactsFileMatch>
</PropertyGroup>

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\Merq.props" />

<PropertyGroup>
<VerifyTargetVersion>false</VerifyTargetVersion>
<BypassVsixValidation Condition="'$(CI)' == 'true'">true</BypassVsixValidation>

<UseCodebase>true</UseCodebase>
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>

<ExtensionInstallationFolder>Merq</ExtensionInstallationFolder>
<IsProductComponent>true</IsProductComponent>
</PropertyGroup>

</Project>