Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/trevors/mbpresteps broken template/testnewmbpresteps #1290

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
83d4a12
Push nuget packages in 1ES compliant way
AArnott Feb 5, 2024
fa2fa4a
Fix pipeline failures when tests are turned off
AArnott Feb 6, 2024
20d7eb1
Fix name of stage task
AArnott Feb 6, 2024
aab283c
Migrate Microbuild-required variables to a yaml file
AArnott Feb 6, 2024
315a51e
Migrate SBOM plugin installation to the new template style
AArnott Feb 6, 2024
9374605
Add placeholder for localization plugin
AArnott Feb 6, 2024
1c3dadb
Migrate signing plugin installation to the new template style
AArnott Feb 6, 2024
0ed99f2
Bump MicroBuild to 2.0.149
AArnott Feb 6, 2024
f8b892b
Remove compliance tasks
AArnott Feb 7, 2024
1ce395c
Bring back PoliCheck
AArnott Feb 7, 2024
9e2495e
Drop Codeql.Enabled variable
AArnott Feb 7, 2024
3850286
File bugs for APIScan issues
AArnott Feb 7, 2024
863c524
Move Policheck to the 1ES PT
AArnott Feb 7, 2024
42d1837
Disable Policheck on non-compliance runs
AArnott Feb 7, 2024
3c87039
Fix missing TeamEmail and TeamName in insertVS task
AArnott Feb 8, 2024
5e36c8b
Drop ComponentGovernance from the pipeline
AArnott Feb 9, 2024
823f34d
Add missing $ characters in pipeline
AArnott Feb 9, 2024
f301981
Publish artifacts even on failed pipelines
AArnott Feb 12, 2024
09f29b8
Switch job disabling style
AArnott Feb 12, 2024
4ac532d
Remove `EnableSBOMSigning` variable
AArnott Feb 13, 2024
8279596
Share variables across all entrypoints
AArnott Feb 13, 2024
1f5f127
Fix Expand-Template.ps1
AArnott Feb 13, 2024
64b2ae3
Clarify purpose of nuGetServiceConnection
AArnott Feb 14, 2024
4475f93
Drop Ref12Analyze task
AArnott Feb 14, 2024
6dc738b
Fix publish for scheduled pipeline runs
AArnott Feb 14, 2024
a7dbfbc
Add missing elements for turnkey localization
AArnott Feb 16, 2024
c7fe3ec
Fix LocBin to not fail before a build occurs
AArnott Feb 16, 2024
988ff32
Drop `outputParentDirectory` from release pipelines
AArnott Feb 16, 2024
e5c43bf
Fix release pipeline
AArnott Feb 16, 2024
bfd8c6c
Add OptProf support to Library.Template
AArnott Feb 14, 2024
ee7d918
Fix InsertConfigValues computed value in OptProf runs
AArnott Feb 16, 2024
a5a2120
Merge remote-tracking branch 'libtemplate/optprof_support' into libte…
AArnott Feb 16, 2024
ceea2ee
Merge remote-tracking branch 'libtemplate/optprof_support' into libte…
AArnott Feb 16, 2024
6403142
Try a different way for mbpresteps
trevors20 Feb 21, 2024
9bc7a68
Move those steps up to the top level yaml.
trevors20 Feb 22, 2024
7a6a4e9
Remove the previous template step of the install-dependencies template.
trevors20 Feb 22, 2024
6b79e78
Fix syntax.
trevors20 Feb 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<MicroBuildVersion>2.0.147</MicroBuildVersion>
<MicroBuildVersion>2.0.149</MicroBuildVersion>
<CodeAnalysisVersion>3.11.0</CodeAnalysisVersion>
<CodeAnalysisVersion Condition="'$(IsTestProject)'=='true'">4.4.0</CodeAnalysisVersion>
<CodefixTestingVersion>1.1.1</CodefixTestingVersion>
Expand Down
6 changes: 2 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ parameters:
default: true

variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BuildConfiguration: Release
# codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages/
- template: /azure-pipelines/BuildStageVariables.yml@self

jobs:
- template: azure-pipelines/build.yml
parameters:
Is1ESPT: false
includeMacOS: ${{ parameters.includeMacOS }}
ShouldSkipOptimize:
RunTests: ${{ parameters.RunTests }}
Expand Down
5 changes: 5 additions & 0 deletions azure-pipelines/BuildStageVariables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BuildConfiguration: Release
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages/
# codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/
4 changes: 4 additions & 0 deletions azure-pipelines/GlobalVariables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
variables:
# These variables are required for MicroBuild tasks
TeamName: VS IDE
TeamEmail: vsidemicrobuild@microsoft.com
25 changes: 11 additions & 14 deletions azure-pipelines/OptProf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,11 @@ schedules:
# ref: refs/heads/test

variables:
- name: TreatWarningsAsErrors
value: true
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: BuildConfiguration
value: Release
- name: BuildPlatform
value: Any CPU
- name: NUGET_PACKAGES
value: $(Agent.TempDirectory)/.nuget/packages
- template: BuildStageVariables.yml
- name: PublicRelease
value: false # avoid using nice version since we're building a preliminary/unoptimized package
- name: SignType
value: real
- group: Library.Template
- name: IsOptProf
value: true

stages:
- stage: Library
Expand All @@ -41,9 +31,16 @@ stages:
jobs:
- template: build.yml
parameters:
Is1ESPT: false
RealSign: true
EnableLocalization: false
EnableOptProf: true
EnableCompliance: false
windowsPool: VSEngSS-MicroBuild2022-1ES
includeMacOS: false
ShouldSkipOptimize: true
IsOptProf: true
RunTests: false
- stage: QueueVSBuild
jobs:
- job: QueueOptProf
Expand Down Expand Up @@ -85,7 +82,7 @@ stages:
packagesToPush: $(Agent.TempDirectory)/VSInsertion-Windows/*.nupkg
publishVstsFeed: 97a41293-2972-4f48-8c0e-05493ae82010 # VS feed
allowPackageConflicts: true
- task: MicroBuildInsertVsPayload@3
- task: MicroBuildInsertVsPayload@4
displayName: Insert VS Payload
inputs:
SkipCreatePR: true
Expand Down
19 changes: 19 additions & 0 deletions azure-pipelines/TSAOptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"tsaVersion": "TsaV2",
"codebase": "NewOrUpdate",
"codebaseName": "Microsoft.VisualStudio.Threading",
"tsaStamp": "DevDiv",
"tsaEnvironment": "PROD",
"notificationAliases": [
"vsidemicrobuild@microsoft.com"
],
"codebaseAdmins": [
"REDMOND\\andarno"
],
"instanceUrl": "https://devdiv.visualstudio.com",
"projectName": "DevDiv",
"areaPath": "DevDiv\\VS Core\\Special Projects\\vs-threading",
"iterationPath": "DevDiv",
"alltools": true,
"repositoryName": "vs-threading"
}
2 changes: 2 additions & 0 deletions azure-pipelines/artifacts/LocBin.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Identify LCE files and the binary files they describe
$BinRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..\bin")
if (!(Test-Path $BinRoot)) { return }

$FilesToCopy = @()
$FilesToCopy += Get-ChildItem -Recurse -File -Path $BinRoot |? { $_.FullName -match '\\Localize\\' }

Expand Down
53 changes: 30 additions & 23 deletions azure-pipelines/artifacts/VSInsertion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,36 @@ if (!(Test-Path $NuGetPackages)) {
return @{}
}

$ArtifactBasePath = "$RepoRoot\obj\_artifacts"
$ArtifactPath = "$ArtifactBasePath\VSInsertion"
if (-not (Test-Path $ArtifactPath)) { New-Item -ItemType Directory -Path $ArtifactPath | Out-Null }

$profilingInputs = [xml](Get-Content -Path "$PSScriptRoot\..\ProfilingInputs.props")
$profilingInputs.Project.ItemGroup.TestStore.Include = "vstsdrop:" + (& "$PSScriptRoot\..\variables\ProfilingInputsDropName.ps1")
$profilingInputs.Save("$ArtifactPath\ProfilingInputs.props")

$InsertionMetadataVersion = $(dotnet tool run nbgv get-version -p "$RepoRoot\src" -f json | ConvertFrom-Json).NuGetPackageVersion
if ($env:BUILD_BUILDID) {
# We must ensure unique versions for the insertion metadata package so
# it can contain information that is unique to this build.
# In particular it includes the ProfilingInputsDropName, which contains the BuildId.
# A non-unique package version here may collide with a prior run of this same commit,
# ultimately resulting in a failure of the optprof run.
$InsertionMetadataVersion += '.' + $env:BUILD_BUILDID
}
& (& "$PSScriptRoot\..\Get-NuGetTool.ps1") pack "$PSScriptRoot\..\InsertionMetadataPackage.nuspec" -OutputDirectory $CoreXTPackages -BasePath $ArtifactPath -Version $InsertionMetadataVersion | Out-Null
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
$result = @{
"$PackagesRoot" = (Get-ChildItem $PackagesRoot -Recurse)
}

@{
"$NuGetPackages" = (Get-ChildItem $NuGetPackages -Recurse)
"$CoreXTPackages" = (Get-ChildItem "$CoreXTPackages\Microsoft.VisualStudio.Threading.VSInsertionMetadata.$InsertionMetadataVersion.nupkg");
if ($env:IsOptProf) {
$CoreXTPackages = "$RepoRoot/bin/Packages/$BuildConfiguration/CoreXT"

$ArtifactBasePath = "$RepoRoot\obj\_artifacts"
$ArtifactPath = "$ArtifactBasePath\VSInsertion"
if (-not (Test-Path $ArtifactPath)) { New-Item -ItemType Directory -Path $ArtifactPath | Out-Null }

$profilingInputs = [xml](Get-Content -Path "$PSScriptRoot\..\ProfilingInputs.props")
$profilingInputs.Project.ItemGroup.TestStore.Include = "vstsdrop:" + (& "$PSScriptRoot\..\variables\ProfilingInputsDropName.ps1")
$profilingInputs.Save("$ArtifactPath\ProfilingInputs.props")

$InsertionMetadataVersion = $(dotnet tool run nbgv get-version -p "$RepoRoot\src" -f json | ConvertFrom-Json).NuGetPackageVersion
if ($env:BUILD_BUILDID) {
# We must ensure unique versions for the insertion metadata package so
# it can contain information that is unique to this build.
# In particular it includes the ProfilingInputsDropName, which contains the BuildId.
# A non-unique package version here may collide with a prior run of this same commit,
# ultimately resulting in a failure of the optprof run.
$InsertionMetadataVersion += '.' + $env:BUILD_BUILDID
}
& (& "$PSScriptRoot\..\Get-NuGetTool.ps1") pack "$PSScriptRoot\..\InsertionMetadataPackage.nuspec" -OutputDirectory $CoreXTPackages -BasePath $ArtifactPath -Version $InsertionMetadataVersion | Out-Null
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

$result["$CoreXTPackages"] = (Get-ChildItem "$CoreXTPackages\LibraryName.VSInsertionMetadata.$InsertionMetadataVersion.nupkg");
}

$result