From 49b80b48d60440594097562d10fdc5ddfdcdfdf6 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Fri, 6 Oct 2023 15:16:10 -0500 Subject: [PATCH] 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`). (cherry picked from commit 775e7ebe1f9a32ee219a4a29dbc55d65dcad65b8) Service-Card-Id: 92465420 Service-Version: 1.19 --- build/pipelines/nightly.yml | 43 ---------- build/pipelines/ob-nightly.yml | 6 +- build/pipelines/release.yml | 85 ------------------- .../job-deploy-to-azure-storage.yml | 70 --------------- .../pipeline-onebranch-full-release-build.yml | 14 ++- 5 files changed, 16 insertions(+), 202 deletions(-) delete mode 100644 build/pipelines/nightly.yml delete mode 100644 build/pipelines/release.yml delete mode 100644 build/pipelines/templates-v2/job-deploy-to-azure-storage.yml diff --git a/build/pipelines/nightly.yml b/build/pipelines/nightly.yml deleted file mode 100644 index 6ec737157fd..00000000000 --- a/build/pipelines/nightly.yml +++ /dev/null @@ -1,43 +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 - environment: production-canary - diff --git a/build/pipelines/ob-nightly.yml b/build/pipelines/ob-nightly.yml index bbf81bfe6c9..99cff5b206c 100644 --- a/build/pipelines/ob-nightly.yml +++ b/build/pipelines/ob-nightly.yml @@ -37,9 +37,13 @@ extends: symbolPublishingProject: $(SymbolPublishingProject) ${{ if eq(true, parameters.publishToAzure) }}: extraPublishJobs: - - template: job-deploy-to-azure-storage.yml + - template: build/pipelines/templates-v2/job-deploy-to-azure-storage.yml@self parameters: 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] storagePublicRootURL: $(AppInstallerRootURL) subscription: $(AzureSubscriptionName) diff --git a/build/pipelines/release.yml b/build/pipelines/release.yml deleted file mode 100644 index e016270e87f..00000000000 --- a/build/pipelines/release.yml +++ /dev/null @@ -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 }} diff --git a/build/pipelines/templates-v2/job-deploy-to-azure-storage.yml b/build/pipelines/templates-v2/job-deploy-to-azure-storage.yml deleted file mode 100644 index 140a513ee14..00000000000 --- a/build/pipelines/templates-v2/job-deploy-to-azure-storage.yml +++ /dev/null @@ -1,70 +0,0 @@ -parameters: - - name: buildConfiguration - type: string - - name: pool - type: object - default: [] - - name: dependsOn - type: object - default: null - - name: artifactStem - type: string - default: '' - - name: variables - type: object - default: {} - - name: environment - type: string - - name: storagePublicRootURL - type: string - - name: subscription - type: string - - name: storageAccount - type: string - - name: storageContainer - type: string - -jobs: -- deployment: DeployAzure - ${{ if ne(length(parameters.pool), 0) }}: - pool: ${{ parameters.pool }} - displayName: Publish to Azure Storage (Prod) - dependsOn: ${{ parameters.dependsOn }} - variables: - ${{ insert }}: ${{ parameters.variables }} - environment: ${{ parameters.environment }} - strategy: - runOnce: - deploy: - steps: - - download: none - - - checkout: self - clean: true - fetchDepth: 1 - fetchTags: false # Tags still result in depth > 1 fetch; we don't need them here - submodules: true - persistCredentials: True - - - task: DownloadPipelineArtifact@2 - displayName: Download MSIX Bundle Artifact - inputs: - artifactName: appxbundle-${{ parameters.buildConfiguration }}${{ parameters.artifactStem }} - downloadPath: '$(Build.SourcesDirectory)/_out' - itemPattern: '**/*.msixbundle' - - - pwsh: |- - $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 - displayName: "Produce AppInstaller for MSIX bundle" - - - task: AzureFileCopy@5 - displayName: Publish to Storage Account - inputs: - sourcePath: _out/* - Destination: AzureBlob - azureSubscription: ${{ parameters.subscription }} - storage: ${{ parameters.storageAccount }} - ContainerName: ${{ parameters.storageContainer }} - AdditionalArgumentsForBlobCopy: "--content-type application/octet-stream" - diff --git a/build/pipelines/templates-v2/pipeline-onebranch-full-release-build.yml b/build/pipelines/templates-v2/pipeline-onebranch-full-release-build.yml index fdc50634115..9fc9df3068f 100644 --- a/build/pipelines/templates-v2/pipeline-onebranch-full-release-build.yml +++ b/build/pipelines/templates-v2/pipeline-onebranch-full-release-build.yml @@ -46,6 +46,9 @@ parameters: - name: publishSymbolsToPublic type: boolean default: true + - name: symbolExpiryTime + type: string + default: 36530 # This is the default from PublishSymbols@2 - name: publishVpackToWindows type: boolean default: false @@ -212,10 +215,15 @@ extends: generateSbom: false # Handled by onebranch codeSign: ${{ parameters.codeSign }} afterBuildSteps: + # This directory has to exist, even if we aren't using createvpack, because the Guardian rules demand it. - pwsh: |- - $d = New-Item "$(JobOutputDirectory)/vpack" -Type Directory - Copy-Item -Verbose -Path "$(MsixBundlePath)" -Destination (Join-Path $d 'Microsoft.WindowsTerminal_8wekyb3d8bbwe.msixbundle') - displayName: Stage msixbundle for vpack + New-Item "$(JobOutputDirectory)/vpack" -Type Directory + displayName: Make sure the vpack directory exists + + - ${{ 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) }}: - template: ./build/pipelines/templates-v2/job-package-conpty.yml@self