Skip to content

Commit

Permalink
Merge branch 'microbuild_staging' into microbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed May 1, 2024
2 parents 8f3f283 + dfd8a82 commit 3509e4b
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines/OptProf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ stages:
targetType: filePath
filePath: $(Agent.TempDirectory)/Variables-Windows/_pipelines.ps1
- task: NuGetCommand@2
displayName: Push CoreXT packages to VS feed
displayName: Push VS-repo packages to VS feed
inputs:
command: push
packagesToPush: $(Agent.TempDirectory)/VSInsertion-Windows/*.nupkg
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines/artifacts/VSInsertion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $result = @{
}

if ($env:IsOptProf) {
$CoreXTPackages = "$RepoRoot/bin/Packages/$BuildConfiguration/CoreXT"
$VSRepoPackages = "$RepoRoot/bin/Packages/$BuildConfiguration/VSRepo"

$ArtifactBasePath = "$RepoRoot\obj\_artifacts"
$ArtifactPath = "$ArtifactBasePath\VSInsertion"
Expand All @@ -47,12 +47,12 @@ if ($env:IsOptProf) {
# 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
& (& "$PSScriptRoot\..\Get-NuGetTool.ps1") pack "$PSScriptRoot\..\InsertionMetadataPackage.nuspec" -OutputDirectory $VSRepoPackages -BasePath $ArtifactPath -Version $InsertionMetadataVersion | Out-Null
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

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

$result
2 changes: 1 addition & 1 deletion azure-pipelines/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
condition: and(succeeded(), ${{ parameters.RunTests }})

- ${{ if parameters.IsOptProf }}:
# We have to artifically run this script so that the extra .nupkg is produced for variables/InsertConfigValues.ps1 to notice.
# We have to artifically run this script so that the extra .nupkg is produced for variables/InsertPropsValues.ps1 to notice.
- powershell: azure-pipelines\artifacts\VSInsertion.ps1
displayName: 🔧 Prepare VSInsertion artifact

Expand Down
14 changes: 0 additions & 14 deletions azure-pipelines/variables/InsertConfigValues.ps1

This file was deleted.

16 changes: 14 additions & 2 deletions azure-pipelines/variables/InsertPropsValues.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# These values are commonly the same.
& "$PSScriptRoot/InsertConfigValues.ps1"
$InsertedPkgs = (& "$PSScriptRoot\..\artifacts\VSInsertion.ps1")

$icv=@()
foreach ($kvp in $InsertedPkgs.GetEnumerator()) {
$kvp.Value |% {
if ($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") {
$id = $Matches[1]
$version = $Matches[2]
$icv += "$id=$version"
}
}
}

Write-Output ([string]::join(',',$icv))
2 changes: 1 addition & 1 deletion azure-pipelines/vs-insertion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extends:
artifact: VSInsertion-Windows
displayName: 🔻 Download VSInsertion-Windows artifact
- task: 1ES.PublishNuget@1
displayName: 📦 Push CoreXT packages to VS feed
displayName: 📦 Push VS-repo packages to VS feed
inputs:
packagesToPush: '$(Pipeline.Workspace)/CI/VSInsertion-Windows/*.nupkg'
packageParentPath: $(Pipeline.Workspace)/CI/VSInsertion-Windows
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/vs-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extends:
artifact: VSInsertion-Windows
displayName: 🔻 Download VSInsertion-Windows artifact
- task: 1ES.PublishNuget@1
displayName: 📦 Push CoreXT packages to VS feed
displayName: 📦 Push VS-repo packages to VS feed
inputs:
packagesToPush: '$(Pipeline.Workspace)/VSInsertion-Windows/*.nupkg'
packageParentPath: $(Pipeline.Workspace)/VSInsertion-Windows
Expand Down

0 comments on commit 3509e4b

Please sign in to comment.