mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-19 18:11:39 -05:00
Port the nightly build pipeline to OneBranch as well (#16108)
This pull request also removes the original release and nightly pipelines, but it does not remove the release pipeline _template_. I had to demote the Azure job from being a _deployment_ to being a plain old job, unfortunately. Alas! Review with whitespace disabled (or `git diff -w`).
This commit is contained in:
@@ -1,44 +0,0 @@
|
|||||||
trigger: none
|
|
||||||
pr: none
|
|
||||||
schedules:
|
|
||||||
- cron: "30 3 * * 2-6" # Run at 03:30 UTC Tuesday through Saturday (After the work day in Pacific, Mon-Fri)
|
|
||||||
displayName: "Nightly Terminal Build"
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- main
|
|
||||||
always: false # only run if there's code changes!
|
|
||||||
|
|
||||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
|
||||||
|
|
||||||
parameters:
|
|
||||||
- name: publishToAzure
|
|
||||||
displayName: "Deploy to **PUBLIC** Azure Storage"
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
|
|
||||||
extends:
|
|
||||||
template: templates-v2\pipeline-full-release-build.yml
|
|
||||||
parameters:
|
|
||||||
branding: Canary
|
|
||||||
buildTerminal: true
|
|
||||||
pgoBuildMode: Optimize
|
|
||||||
codeSign: true
|
|
||||||
generateSbom: true
|
|
||||||
publishSymbolsToPublic: true
|
|
||||||
publishVpackToWindows: false
|
|
||||||
symbolExpiryTime: 15 # Nightly builds do not keep symbols for very long!
|
|
||||||
${{ if eq(true, parameters.publishToAzure) }}:
|
|
||||||
extraPublishJobs:
|
|
||||||
- template: job-deploy-to-azure-storage.yml
|
|
||||||
parameters:
|
|
||||||
pool:
|
|
||||||
name: SHINE-INT-S
|
|
||||||
dependsOn: [PublishSymbols]
|
|
||||||
storagePublicRootURL: $(AppInstallerRootURL)
|
|
||||||
subscription: $(AzureSubscriptionName)
|
|
||||||
storageAccount: $(AzureStorageAccount)
|
|
||||||
storageContainer: $(AzureStorageContainer)
|
|
||||||
buildConfiguration: Release
|
|
||||||
buildPlatforms: [x64, x86, arm64]
|
|
||||||
environment: production-canary
|
|
||||||
|
|
||||||
@@ -33,9 +33,13 @@ extends:
|
|||||||
symbolExpiryTime: 15
|
symbolExpiryTime: 15
|
||||||
${{ if eq(true, parameters.publishToAzure) }}:
|
${{ if eq(true, parameters.publishToAzure) }}:
|
||||||
extraPublishJobs:
|
extraPublishJobs:
|
||||||
- template: job-deploy-to-azure-storage.yml
|
- template: build/pipelines/templates-v2/job-deploy-to-azure-storage.yml@self
|
||||||
parameters:
|
parameters:
|
||||||
pool: { type: windows }
|
pool: { type: windows }
|
||||||
|
variables:
|
||||||
|
ob_git_checkout: false # This job checks itself out
|
||||||
|
ob_git_skip_checkout_none: true
|
||||||
|
ob_outputDirectory: "$(Build.SourcesDirectory)/_none"
|
||||||
dependsOn: [PublishSymbols]
|
dependsOn: [PublishSymbols]
|
||||||
storagePublicRootURL: $(AppInstallerRootURL)
|
storagePublicRootURL: $(AppInstallerRootURL)
|
||||||
subscription: $(AzureSubscriptionName)
|
subscription: $(AzureSubscriptionName)
|
||||||
|
|||||||
@@ -1,85 +0,0 @@
|
|||||||
trigger: none
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
# Expose all of these parameters for user configuration.
|
|
||||||
parameters:
|
|
||||||
- name: branding
|
|
||||||
displayName: "Branding (Build Type)"
|
|
||||||
type: string
|
|
||||||
default: Release
|
|
||||||
values:
|
|
||||||
- Release
|
|
||||||
- Preview
|
|
||||||
- Canary
|
|
||||||
- Dev
|
|
||||||
- name: buildTerminal
|
|
||||||
displayName: "Build Windows Terminal MSIX"
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
- name: buildConPTY
|
|
||||||
displayName: "Build ConPTY NuGet"
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
- name: buildWPF
|
|
||||||
displayName: "Build Terminal WPF Control"
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
- name: pgoBuildMode
|
|
||||||
displayName: "PGO Build Mode"
|
|
||||||
type: string
|
|
||||||
default: Optimize
|
|
||||||
values:
|
|
||||||
- Optimize
|
|
||||||
- Instrument
|
|
||||||
- None
|
|
||||||
- name: buildConfigurations
|
|
||||||
displayName: "Build Configurations"
|
|
||||||
type: object
|
|
||||||
default:
|
|
||||||
- Release
|
|
||||||
- name: buildPlatforms
|
|
||||||
displayName: "Build Platforms"
|
|
||||||
type: object
|
|
||||||
default:
|
|
||||||
- x64
|
|
||||||
- x86
|
|
||||||
- arm64
|
|
||||||
- name: codeSign
|
|
||||||
displayName: "Sign all build outputs"
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
- name: generateSbom
|
|
||||||
displayName: "Generate a Bill of Materials"
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
- name: terminalInternalPackageVersion
|
|
||||||
displayName: "Terminal Internal Package Version"
|
|
||||||
type: string
|
|
||||||
default: '0.0.8'
|
|
||||||
|
|
||||||
- name: publishSymbolsToPublic
|
|
||||||
displayName: "Publish Symbols to MSDL"
|
|
||||||
type: boolean
|
|
||||||
default: true
|
|
||||||
- name: publishVpackToWindows
|
|
||||||
displayName: "Publish VPack to Windows"
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
|
||||||
|
|
||||||
extends:
|
|
||||||
template: templates-v2/pipeline-full-release-build.yml
|
|
||||||
parameters:
|
|
||||||
branding: ${{ parameters.branding }}
|
|
||||||
buildTerminal: ${{ parameters.buildTerminal }}
|
|
||||||
buildConPTY: ${{ parameters.buildConPTY }}
|
|
||||||
buildWPF: ${{ parameters.buildWPF }}
|
|
||||||
pgoBuildMode: ${{ parameters.pgoBuildMode }}
|
|
||||||
buildConfigurations: ${{ parameters.buildConfigurations }}
|
|
||||||
buildPlatforms: ${{ parameters.buildPlatforms }}
|
|
||||||
codeSign: ${{ parameters.codeSign }}
|
|
||||||
generateSbom: ${{ parameters.generateSbom }}
|
|
||||||
terminalInternalPackageVersion: ${{ parameters.terminalInternalPackageVersion }}
|
|
||||||
publishSymbolsToPublic: ${{ parameters.publishSymbolsToPublic }}
|
|
||||||
publishVpackToWindows: ${{ parameters.publishVpackToWindows }}
|
|
||||||
@@ -27,65 +27,66 @@ parameters:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- deployment: DeployAzure
|
- job: DeployAzure
|
||||||
${{ if ne(length(parameters.pool), 0) }}:
|
${{ if ne(length(parameters.pool), 0) }}:
|
||||||
pool: ${{ parameters.pool }}
|
pool: ${{ parameters.pool }}
|
||||||
displayName: Publish to Azure Storage (Prod)
|
displayName: Publish to Azure Storage (Prod)
|
||||||
dependsOn: ${{ parameters.dependsOn }}
|
dependsOn: ${{ parameters.dependsOn }}
|
||||||
variables:
|
variables:
|
||||||
${{ insert }}: ${{ parameters.variables }}
|
${{ insert }}: ${{ parameters.variables }}
|
||||||
environment: ${{ parameters.environment }}
|
steps:
|
||||||
strategy:
|
- download: none
|
||||||
runOnce:
|
|
||||||
deploy:
|
|
||||||
steps:
|
|
||||||
- download: none
|
|
||||||
|
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
fetchDepth: 1
|
fetchDepth: 1
|
||||||
fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here
|
fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here
|
||||||
submodules: true
|
submodules: true
|
||||||
persistCredentials: True
|
persistCredentials: True
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
displayName: Download MSIX Bundle Artifact
|
displayName: Download MSIX Bundle Artifact
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: appxbundle-${{ parameters.buildConfiguration }}${{ parameters.artifactStem }}
|
artifactName: appxbundle-${{ parameters.buildConfiguration }}${{ parameters.artifactStem }}
|
||||||
downloadPath: '$(Build.SourcesDirectory)/_out'
|
downloadPath: '$(Build.SourcesDirectory)/_out'
|
||||||
itemPattern: '**/*.msixbundle'
|
itemPattern: '**/*.msixbundle'
|
||||||
|
|
||||||
- ${{ each platform in parameters.buildPlatforms }}:
|
- ${{ each platform in parameters.buildPlatforms }}:
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
displayName: Download unpackaged build for ${{ platform }} ${{ parameters.buildConfiguration }}
|
displayName: Download unpackaged build for ${{ platform }} ${{ parameters.buildConfiguration }}
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: build-${{ platform }}-${{ parameters.buildConfiguration }}${{ parameters.artifactStem }}
|
artifactName: build-${{ platform }}-${{ parameters.buildConfiguration }}${{ parameters.artifactStem }}
|
||||||
downloadPath: '$(Build.SourcesDirectory)/_unpackaged'
|
downloadPath: '$(Build.SourcesDirectory)/_unpackaged'
|
||||||
itemPattern: '**/_unpackaged/*.zip'
|
itemPattern: '**/_unpackaged/*.zip'
|
||||||
|
|
||||||
- pwsh: |-
|
- pwsh: |-
|
||||||
$b = Get-Item _out/*.msixbundle
|
$b = Get-Item _out/*.msixbundle
|
||||||
./build/scripts/New-AppInstallerFromTemplateAndBundle.ps1 -BundlePath $b.FullName -AppInstallerTemplatePath ./build/config/template.appinstaller -AppInstallerRoot "${{ parameters.storagePublicRootURL }}" -OutputPath _out/Microsoft.WindowsTerminalCanary.appinstaller
|
./build/scripts/New-AppInstallerFromTemplateAndBundle.ps1 -BundlePath $b.FullName -AppInstallerTemplatePath ./build/config/template.appinstaller -AppInstallerRoot "${{ parameters.storagePublicRootURL }}" -OutputPath _out/Microsoft.WindowsTerminalCanary.appinstaller
|
||||||
displayName: "Produce AppInstaller for MSIX bundle"
|
displayName: "Produce AppInstaller for MSIX bundle"
|
||||||
|
|
||||||
- pwsh: |-
|
- pwsh: |-
|
||||||
$zips = Get-ChildItem -Recurse -Filter *.zip _unpackaged
|
$zips = Get-ChildItem -Recurse -Filter *.zip _unpackaged
|
||||||
$zips | ForEach-Object {
|
$zips | ForEach-Object {
|
||||||
$name = $_.Name
|
$name = $_.Name
|
||||||
$parts = $name.Split('_')
|
$parts = $name.Split('_')
|
||||||
$parts[1] = "latest"
|
$parts[1] = "latest"
|
||||||
$name = [String]::Join('_', $parts)
|
$name = [String]::Join('_', $parts)
|
||||||
$_ | Move-Item -Destination (Join-Path "_out" $name)
|
$_ | Move-Item -Destination (Join-Path "_out" $name)
|
||||||
}
|
}
|
||||||
displayName: "Wrangle Unpackaged builds into place, rename"
|
displayName: "Wrangle Unpackaged builds into place, rename"
|
||||||
|
|
||||||
- task: AzureFileCopy@5
|
- powershell: |-
|
||||||
displayName: Publish to Storage Account
|
Get-PackageProvider -Name NuGet -ForceBootstrap
|
||||||
inputs:
|
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
|
||||||
sourcePath: _out/*
|
displayName: Install Azure Module Dependencies
|
||||||
Destination: AzureBlob
|
|
||||||
azureSubscription: ${{ parameters.subscription }}
|
- task: AzureFileCopy@5
|
||||||
storage: ${{ parameters.storageAccount }}
|
displayName: Publish to Storage Account
|
||||||
ContainerName: ${{ parameters.storageContainer }}
|
inputs:
|
||||||
AdditionalArgumentsForBlobCopy: "--content-type application/octet-stream"
|
sourcePath: _out/*
|
||||||
|
Destination: AzureBlob
|
||||||
|
azureSubscription: ${{ parameters.subscription }}
|
||||||
|
storage: ${{ parameters.storageAccount }}
|
||||||
|
ContainerName: ${{ parameters.storageContainer }}
|
||||||
|
AdditionalArgumentsForBlobCopy: "--content-type application/octet-stream"
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ parameters:
|
|||||||
- name: publishSymbolsToPublic
|
- name: publishSymbolsToPublic
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
- name: symbolExpiryTime
|
||||||
|
type: string
|
||||||
|
default: 36530 # This is the default from PublishSymbols@2
|
||||||
- name: publishVpackToWindows
|
- name: publishVpackToWindows
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
@@ -202,10 +205,15 @@ extends:
|
|||||||
generateSbom: false # Handled by onebranch
|
generateSbom: false # Handled by onebranch
|
||||||
codeSign: ${{ parameters.codeSign }}
|
codeSign: ${{ parameters.codeSign }}
|
||||||
afterBuildSteps:
|
afterBuildSteps:
|
||||||
|
# This directory has to exist, even if we aren't using createvpack, because the Guardian rules demand it.
|
||||||
- pwsh: |-
|
- pwsh: |-
|
||||||
$d = New-Item "$(JobOutputDirectory)/vpack" -Type Directory
|
New-Item "$(JobOutputDirectory)/vpack" -Type Directory
|
||||||
Copy-Item -Verbose -Path "$(MsixBundlePath)" -Destination (Join-Path $d 'Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle')
|
displayName: Make sure the vpack directory exists
|
||||||
displayName: Stage msixbundle for vpack
|
|
||||||
|
- ${{ if parameters.publishVpackToWindows }}:
|
||||||
|
- pwsh: |-
|
||||||
|
Copy-Item -Verbose -Path "$(MsixBundlePath)" -Destination (Join-Path "$(JobOutputDirectory)/vpack" 'Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle')
|
||||||
|
displayName: Stage msixbundle for vpack
|
||||||
|
|
||||||
- ${{ if eq(parameters.buildConPTY, true) }}:
|
- ${{ if eq(parameters.buildConPTY, true) }}:
|
||||||
- template: ./build/pipelines/templates-v2/job-package-conpty.yml@self
|
- template: ./build/pipelines/templates-v2/job-package-conpty.yml@self
|
||||||
@@ -246,6 +254,7 @@ extends:
|
|||||||
pool: { type: windows }
|
pool: { type: windows }
|
||||||
includePublicSymbolServer: ${{ parameters.publishSymbolsToPublic }}
|
includePublicSymbolServer: ${{ parameters.publishSymbolsToPublic }}
|
||||||
symbolPatGoesInTaskInputs: true # onebranch tries to muck with the PAT variable, so we need to change how it get the PAT
|
symbolPatGoesInTaskInputs: true # onebranch tries to muck with the PAT variable, so we need to change how it get the PAT
|
||||||
|
symbolExpiryTime: ${{ parameters.symbolExpiryTime }}
|
||||||
variables:
|
variables:
|
||||||
ob_git_checkout: false # This job checks itself out
|
ob_git_checkout: false # This job checks itself out
|
||||||
ob_git_skip_checkout_none: true
|
ob_git_skip_checkout_none: true
|
||||||
|
|||||||
Reference in New Issue
Block a user