mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-06 14:19:45 +00:00
Compare commits
3 Commits
dev/migrie
...
dev/duhowe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06ccfd601d | ||
|
|
c0531c5426 | ||
|
|
06f212f08e |
@@ -32,57 +32,14 @@ variables:
|
||||
name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr)
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
displayName: Build
|
||||
dependsOn: []
|
||||
condition: succeeded()
|
||||
jobs:
|
||||
- template: ./templates-v2/job-build-project.yml
|
||||
parameters:
|
||||
pool:
|
||||
${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
|
||||
name: SHINE-OSS-L
|
||||
${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
|
||||
name: SHINE-INT-L
|
||||
branding: ${{ parameters.branding }}
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
buildConfigurations: [Release]
|
||||
buildEverything: true
|
||||
pgoBuildMode: Instrument
|
||||
artifactStem: -instrumentation
|
||||
|
||||
- stage: RunPGO
|
||||
displayName: Run PGO
|
||||
dependsOn: [Build]
|
||||
condition: succeeded()
|
||||
jobs:
|
||||
- ${{ each platform in parameters.buildPlatforms }}:
|
||||
- template: ./templates-v2/job-run-pgo-tests.yml
|
||||
parameters:
|
||||
# This job chooses its own pools based on platform
|
||||
buildPlatform: ${{ platform }}
|
||||
buildConfiguration: Release
|
||||
artifactStem: -instrumentation
|
||||
|
||||
- stage: FinalizePGO
|
||||
displayName: Finalize PGO and Publish
|
||||
dependsOn: [RunPGO]
|
||||
condition: succeeded()
|
||||
jobs:
|
||||
# This job takes multiple platforms and fans them back in to a single artifact.
|
||||
- template: ./templates-v2/job-pgo-merge-pgd.yml
|
||||
parameters:
|
||||
jobName: MergePGD
|
||||
pool:
|
||||
vmImage: 'windows-2022'
|
||||
buildConfiguration: Release
|
||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
||||
artifactStem: -instrumentation
|
||||
|
||||
- template: ./templates-v2/job-pgo-build-nuget-and-publish.yml
|
||||
parameters:
|
||||
pool:
|
||||
vmImage: 'windows-2022'
|
||||
dependsOn: MergePGD
|
||||
buildConfiguration: Release
|
||||
artifactStem: -instrumentation
|
||||
subscription: $(NugetPublishingServiceConnection)
|
||||
|
||||
@@ -13,12 +13,13 @@ parameters:
|
||||
- name: jobName
|
||||
type: string
|
||||
default: BuildAndPublishPGONuget
|
||||
- name: subscription
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
${{ if ne(length(parameters.pool), 0) }}:
|
||||
pool: ${{ parameters.pool }}
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
displayName: Package and Publish PGO Databases
|
||||
|
||||
variables:
|
||||
@@ -38,14 +39,32 @@ jobs:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Final PGO Databases
|
||||
inputs:
|
||||
buildType: specific
|
||||
project: Dart
|
||||
definition: 71496
|
||||
pipelineId: 96166192
|
||||
buildVersionToDownload: specific
|
||||
artifact: pgd-merged-${{ parameters.buildConfiguration }}${{ parameters.artifactStem }}
|
||||
downloadPath: $(artifactsPath)
|
||||
|
||||
- template: steps-ensure-nuget-version.yml
|
||||
|
||||
- task: NuGetAuthenticate@1
|
||||
- powershell: |-
|
||||
Get-PackageProvider -Name NuGet -ForceBootstrap
|
||||
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
|
||||
displayName: Install Azure Module Dependencies
|
||||
|
||||
# Transit the Azure token from the Service Connection into nuget for the rest of the pipeline to use.
|
||||
- task: AzurePowerShell@5
|
||||
displayName: Generate an Azure Token
|
||||
inputs:
|
||||
nuGetServiceConnections: 'Terminal Public Artifact Feed'
|
||||
azureSubscription: ${{ parameters.subscription }}
|
||||
azurePowerShellVersion: LatestVersion
|
||||
pwsh: true
|
||||
ScriptType: InlineScript
|
||||
Inline: |-
|
||||
$AzToken = (Get-AzAccessToken -ResourceUrl 499b84ac-1321-427f-aa17-267ca6975798).Token
|
||||
Write-Host "##vso[task.setvariable variable=AzureToken;issecret=true]$AzToken"
|
||||
|
||||
# In the Microsoft Azure DevOps tenant, NuGetCommand is ambiguous.
|
||||
# This should be `task: NuGetCommand@2`
|
||||
@@ -68,15 +87,6 @@ jobs:
|
||||
artifact: pgo-nupkg-${{ parameters.buildConfiguration }}${{ parameters.artifactStem }}
|
||||
displayName: "Publish Pipeline Artifact"
|
||||
|
||||
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
|
||||
displayName: 'NuGet push'
|
||||
inputs:
|
||||
command: push
|
||||
nuGetFeedType: external
|
||||
packagesToPush: $(Build.ArtifactStagingDirectory)/*.nupkg
|
||||
# The actual URL and PAT for this feed is configured at
|
||||
# https://microsoft.visualstudio.com/Dart/_settings/adminservices
|
||||
# This is the name of that connection
|
||||
publishFeedCredentials: 'Terminal Public Artifact Feed'
|
||||
feedsToUse: config
|
||||
nugetConfigPath: '$(Build.SourcesDirectory)/NuGet.config'
|
||||
- pwsh: |-
|
||||
& nuget push -source TerminalDependencies -apikey $(AzureToken) (Get-Item "$(Build.ArtifactStagingDirectory)/*.nupkg")
|
||||
displayName: NuGet push
|
||||
|
||||
Reference in New Issue
Block a user