Skip to content

Commit a2ff076

Browse files
authored
Merge pull request #1373 from microsoft/dev/andarno/libtemplateUpdate
Merge latest Library.Template
2 parents d2dbff7 + 2869efb commit a2ff076

File tree

12 files changed

+159
-102
lines changed

12 files changed

+159
-102
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
2-
FROM mcr.microsoft.com/dotnet/sdk:9.0.101-noble
2+
FROM mcr.microsoft.com/dotnet/sdk:9.0.102-noble
33

44
# Installing mono makes `dotnet test` work without errors even for net472.
55
# But installing it takes a long time, so it's excluded by default.

azure-pipelines/Install-NuGetPackage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Param(
3333
[string]$Verbosity='normal'
3434
)
3535

36-
$nugetPath = & "$PSScriptRoot\Get-NuGetTool.ps1"
36+
$nugetPath = & "$PSScriptRoot\..\tools\Get-NuGetTool.ps1"
3737

3838
try {
3939
Write-Verbose "Installing $PackageId..."

azure-pipelines/apiscan.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
parameters:
22
- name: windowsPool
33
type: object
4+
- name: RealSign
5+
type: boolean
46

57
jobs:
68
- job: apiscan
@@ -9,6 +11,12 @@ jobs:
911
pool: ${{ parameters.windowsPool }}
1012
timeoutInMinutes: 120
1113
templateContext:
14+
${{ if not(parameters.RealSign) }}:
15+
mb:
16+
signing: # if the build is test-signed, install the signing plugin so that CSVTestSignPolicy.xml is available
17+
enabled: true
18+
zipSources: false
19+
signType: test
1220
outputs:
1321
- output: pipelineArtifact
1422
displayName: 📢 collect apiscan artifact

azure-pipelines/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,4 @@ jobs:
309309
- template: apiscan.yml
310310
parameters:
311311
windowsPool: ${{ parameters.windowsPool }}
312+
RealSign: ${{ parameters.RealSign }}

azure-pipelines/official.yml

Lines changed: 41 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
trigger:
2-
batch: true
3-
branches:
4-
include:
5-
- main
6-
- 'v16.*'
7-
- 'v17.*'
8-
- 'validate/*'
9-
paths:
10-
exclude:
11-
- doc/
12-
- '*.md'
13-
- .vscode/
14-
- azure-pipelines/release.yml
15-
- azure-pipelines/vs-insertion.yml
1+
trigger: none # We only want to trigger manually or based on a schedule
2+
pr: none
163
schedules:
174
- cron: "0 3 * * *" # Daily @ 8 PM PST
185
displayName: Daily vs-insertion
@@ -24,10 +11,6 @@ parameters:
2411
# As an entrypoint pipeline yml file, all parameters here show up in the Queue Run dialog.
2512
# If any paramaters should NOT be queue-time options, they should be removed from here
2613
# and references to them in this file replaced with hard-coded values.
27-
- name: ForceOfficialBuild
28-
displayName: Official build (sign, compliance, etc.)
29-
type: boolean
30-
default: false # this should remain false so PR builds using this pipeline are unofficial
3114
- name: ShouldSkipOptimize
3215
displayName: Skip OptProf optimization
3316
type: boolean
@@ -56,75 +39,44 @@ variables:
5639
- template: GlobalVariables.yml
5740

5841
extends:
59-
${{ if or(parameters.ForceOfficialBuild, eq(variables['Build.Reason'],'Schedule')) }}:
60-
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
61-
parameters:
62-
sdl:
63-
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
64-
codeSignValidation:
65-
enabled: true
66-
break: true
67-
additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|APIScanInputs-*\**;-|test_symbols-*\**;-|MicroBuild\**
68-
policheck:
69-
enabled: true
70-
exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml
71-
suppression:
72-
suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress
73-
sbom:
74-
enabled: true
75-
stages:
76-
- stage: Build
77-
variables:
78-
- template: /azure-pipelines/BuildStageVariables.yml@self
79-
jobs:
80-
- template: /azure-pipelines/build.yml@self
81-
parameters:
82-
Is1ESPT: true
83-
RealSign: true
84-
ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }}
85-
EnableAPIScan: ${{ and(parameters.EnableAPIScan, ne(variables['Build.Reason'], 'pullRequest')) }}
86-
windowsPool: VSEngSS-MicroBuild2022-1ES
87-
linuxPool:
88-
name: AzurePipelines-EO
89-
demands:
90-
- ImageOverride -equals 1ESPT-Ubuntu22.04
91-
os: Linux
92-
macOSPool:
93-
name: Azure Pipelines
94-
vmImage: macOS-14
95-
os: macOS
96-
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
97-
RunTests: ${{ parameters.RunTests }}
98-
- template: /azure-pipelines/prepare-insertion-stages.yml@self
42+
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
43+
parameters:
44+
sdl:
45+
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
46+
codeSignValidation:
47+
enabled: true
48+
break: true
49+
additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|APIScanInputs-*\**;-|test_symbols-*\**;-|MicroBuild\**
50+
policheck:
51+
enabled: true
52+
exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml
53+
suppression:
54+
suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress
55+
sbom:
56+
enabled: true
57+
stages:
58+
- stage: Build
59+
variables:
60+
- template: /azure-pipelines/BuildStageVariables.yml@self
61+
jobs:
62+
- template: /azure-pipelines/build.yml@self
9963
parameters:
64+
Is1ESPT: true
10065
RealSign: true
101-
${{ else }}:
102-
template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate
103-
parameters:
104-
sdl:
105-
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
106-
suppression:
107-
suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress
108-
stages:
109-
- stage: Build
110-
variables:
111-
- template: /azure-pipelines/BuildStageVariables.yml@self
112-
jobs:
113-
- template: /azure-pipelines/build.yml@self
114-
parameters:
115-
Is1ESPT: true
116-
RealSign: false
117-
ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }}
118-
EnableAPIScan: false
119-
windowsPool: VSEngSS-MicroBuild2022-1ES
120-
linuxPool:
121-
name: AzurePipelines-EO
122-
demands:
123-
- ImageOverride -equals 1ESPT-Ubuntu22.04
124-
os: Linux
125-
macOSPool:
126-
name: Azure Pipelines
127-
vmImage: macOS-14
128-
os: macOS
129-
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
130-
RunTests: ${{ parameters.RunTests }}
66+
ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }}
67+
EnableAPIScan: ${{ parameters.EnableAPIScan }}
68+
windowsPool: VSEngSS-MicroBuild2022-1ES
69+
linuxPool:
70+
name: AzurePipelines-EO
71+
demands:
72+
- ImageOverride -equals 1ESPT-Ubuntu22.04
73+
os: Linux
74+
macOSPool:
75+
name: Azure Pipelines
76+
vmImage: macOS-14
77+
os: macOS
78+
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
79+
RunTests: ${{ parameters.RunTests }}
80+
- template: /azure-pipelines/prepare-insertion-stages.yml@self
81+
parameters:
82+
RealSign: true

azure-pipelines/unofficial.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
trigger:
2+
batch: true
3+
branches:
4+
include:
5+
- main
6+
- 'v16.*'
7+
- 'v17.*'
8+
- 'validate/*'
9+
paths:
10+
exclude:
11+
- doc/
12+
- '*.md'
13+
- .vscode/
14+
- azure-pipelines/release.yml
15+
- azure-pipelines/vs-insertion.yml
16+
17+
parameters:
18+
# As an entrypoint pipeline yml file, all parameters here show up in the Queue Run dialog.
19+
# If any paramaters should NOT be queue-time options, they should be removed from here
20+
# and references to them in this file replaced with hard-coded values.
21+
# - name: ShouldSkipOptimize # Uncomment this and references to it below when setting EnableOptProf to true in build.yml.
22+
# displayName: Skip OptProf optimization
23+
# type: boolean
24+
# default: false
25+
- name: EnableMacOSBuild
26+
displayName: Build on macOS
27+
type: boolean
28+
default: false # macOS is often bogged down in Azure Pipelines
29+
- name: RunTests
30+
displayName: Run tests
31+
type: boolean
32+
default: true
33+
- name: EnableAPIScan
34+
displayName: Include APIScan with compliance tools
35+
type: boolean
36+
default: false
37+
- name: EnableProductionSDL
38+
displayName: Enable Production SDL
39+
type: boolean
40+
default: false
41+
42+
resources:
43+
repositories:
44+
- repository: MicroBuildTemplate
45+
type: git
46+
name: 1ESPipelineTemplates/MicroBuildTemplate
47+
ref: refs/tags/release
48+
49+
variables:
50+
- template: GlobalVariables.yml
51+
52+
extends:
53+
template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate
54+
parameters:
55+
sdl:
56+
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
57+
suppression:
58+
suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress
59+
enableProductionSDL: ${{ parameters.EnableProductionSDL }}
60+
codeSignValidation:
61+
enabled: ${{ parameters.EnableProductionSDL }}
62+
break: true
63+
additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|APIScanInputs-*\**;-|test_symbols-*\**;-|MicroBuild\**
64+
policyFile: $(MBSIGN_APPFOLDER)\CSVTestSignPolicy.xml
65+
policheck:
66+
enabled: ${{ parameters.EnableProductionSDL }}
67+
exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml
68+
sbom:
69+
enabled: ${{ parameters.EnableProductionSDL }}
70+
stages:
71+
- stage: Build
72+
variables:
73+
- template: /azure-pipelines/BuildStageVariables.yml@self
74+
jobs:
75+
- template: /azure-pipelines/build.yml@self
76+
parameters:
77+
Is1ESPT: true
78+
RealSign: false
79+
# ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }}
80+
EnableAPIScan: ${{ parameters.EnableAPIScan }}
81+
windowsPool: VSEngSS-MicroBuild2022-1ES
82+
linuxPool:
83+
name: AzurePipelines-EO
84+
demands:
85+
- ImageOverride -equals 1ESPT-Ubuntu22.04
86+
os: Linux
87+
macOSPool:
88+
name: Azure Pipelines
89+
vmImage: macOS-14
90+
os: macOS
91+
EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }}
92+
RunTests: ${{ parameters.RunTests }}

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.101",
3+
"version": "9.0.102",
44
"rollForward": "patch",
55
"allowPrerelease": false
66
},

test/Directory.Build.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
3+
<ItemGroup>
4+
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" Condition="Exists('xunit.runner.json')" />
5+
</ItemGroup>
6+
37
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
48
</Project>

test/Microsoft.VisualStudio.Threading.Analyzers.Tests/app.config

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
3+
"shadowCopy": false
4+
}

0 commit comments

Comments
 (0)