|
| 1 | +# Azure CLI - macOS Release Pipeline (Build → Sign → Test → Publish) |
| 2 | +# |
| 3 | +# Purpose: Complete end-to-end macOS release pipeline |
| 4 | +# Architecture: Chains 4 job templates in sequence |
| 5 | +# |
| 6 | +# Pipeline Flow: |
| 7 | +# 1. macos-build-jobs.yml → Build unsigned tarballs (ARM64 + Intel) |
| 8 | +# 2. macos-sign-notarize-jobs.yml → Sign and notarize via ESRP |
| 9 | +# 3. macos-test-jobs.yml → Test cask (local file://) + offline install |
| 10 | +# 4. macos-publish-jobs.yml → GitHub release + Homebrew cask update |
| 11 | +# |
| 12 | +# Output Artifacts: |
| 13 | +# - cli-build-unsigned-arm64, cli-build-unsigned-x86_64 (intermediate) |
| 14 | +# - cli-signed-notarized-arm64, cli-signed-notarized-x86_64 (final) |
| 15 | + |
| 16 | +trigger: none |
| 17 | + |
| 18 | +parameters: |
| 19 | + # Build parameters |
| 20 | + - name: PythonVersion |
| 21 | + displayName: 'Python Version (Homebrew)' |
| 22 | + type: string |
| 23 | + default: '3.13' |
| 24 | + |
| 25 | + # Sign/notarize parameters |
| 26 | + - name: BundleId |
| 27 | + displayName: 'Bundle ID for notarization' |
| 28 | + type: string |
| 29 | + default: 'com.microsoft.azure.cli' |
| 30 | + |
| 31 | + # Publish parameters |
| 32 | + - name: PublishToGitHub |
| 33 | + displayName: 'Publish to GitHub Release' |
| 34 | + type: boolean |
| 35 | + default: true |
| 36 | + |
| 37 | + - name: GitHubRepo |
| 38 | + displayName: 'GitHub Repository (owner/repo)' |
| 39 | + type: string |
| 40 | + default: 'Azure/homebrew-azure-cli' |
| 41 | + |
| 42 | + - name: UpdateHomebrew |
| 43 | + displayName: 'Update Homebrew cask after release' |
| 44 | + type: boolean |
| 45 | + default: true |
| 46 | + |
| 47 | + - name: HomebrewTapRepo |
| 48 | + displayName: 'Homebrew Tap Repository' |
| 49 | + type: string |
| 50 | + default: 'Azure/homebrew-azure-cli' |
| 51 | + |
| 52 | + - name: GitHubServiceConnection |
| 53 | + displayName: 'GitHub Service Connection' |
| 54 | + type: string |
| 55 | + default: 'Azure' |
| 56 | + |
| 57 | + - name: ESRPServiceConnection |
| 58 | + displayName: 'ESRP Service Connection' |
| 59 | + type: string |
| 60 | + default: 'ame_esrp_connection' |
| 61 | + |
| 62 | + - name: Debug |
| 63 | + displayName: 'Enable debug diagnostics' |
| 64 | + type: boolean |
| 65 | + default: false |
| 66 | + |
| 67 | +resources: |
| 68 | + repositories: |
| 69 | + - repository: homebrewtap |
| 70 | + type: github |
| 71 | + endpoint: 'Azure' |
| 72 | + name: Azure/homebrew-azure-cli |
| 73 | + ref: main |
| 74 | + |
| 75 | +variables: |
| 76 | + - template: templates/variables.yml |
| 77 | + - ${{ if eq(variables['System.TeamProject'], 'release') }}: |
| 78 | + - group: 'AME ESRP Variable Group' |
| 79 | + |
| 80 | + - name: GitHubRepo |
| 81 | + value: ${{ parameters.GitHubRepo }} |
| 82 | + - name: HomebrewTapRepo |
| 83 | + value: ${{ parameters.HomebrewTapRepo }} |
| 84 | + |
| 85 | + # Disable auto-injection tasks |
| 86 | + - name: Codeql.Enabled |
| 87 | + value: false |
| 88 | + - name: Codeql.SkipTaskAutoInjection |
| 89 | + value: true |
| 90 | + - name: CodeQL.enabled |
| 91 | + value: false |
| 92 | + - name: runCodesignValidationInjection |
| 93 | + value: false |
| 94 | + - name: DOTNET_CLI_TELEMETRY_OPTOUT |
| 95 | + value: 1 |
| 96 | + - name: DOTNET_NOLOGO |
| 97 | + value: 1 |
| 98 | + - name: NugetSecurityAnalysisWarningLevel |
| 99 | + value: none |
| 100 | + - name: skipNugetSecurityAnalysis |
| 101 | + value: true |
| 102 | + |
| 103 | +name: macos-release-$(Build.BuildId) |
| 104 | + |
| 105 | +# ============================================================================ |
| 106 | +# JOBS: End-to-end macOS release flow |
| 107 | +# ============================================================================ |
| 108 | +jobs: |
| 109 | +# ============================================================================ |
| 110 | +# PHASE 1: BUILD (unsigned tarballs) |
| 111 | +# ============================================================================ |
| 112 | +- template: templates/macos/macos-build-jobs.yml |
| 113 | + parameters: |
| 114 | + PythonVersion: ${{ parameters.PythonVersion }} |
| 115 | + MacosArm64Image: ${{ variables.macos_arm64_pool }} |
| 116 | + MacosIntelImage: ${{ variables.macos_intel_pool }} |
| 117 | + |
| 118 | +# Jobs included: |
| 119 | +# - BuildMacOSCli (matrix: ARM64 + Intel) |
| 120 | +# - VerifyMacOSCli (matrix: ARM64 + Intel) |
| 121 | +# Artifacts: cli-build-unsigned-arm64, cli-build-unsigned-x86_64 |
| 122 | + |
| 123 | +# ============================================================================ |
| 124 | +# PHASE 2: SIGN & NOTARIZE (via ESRP) |
| 125 | +# ============================================================================ |
| 126 | +- ${{ if eq(variables['System.TeamProject'], 'release') }}: |
| 127 | + - template: templates/macos/macos-sign-notarize-jobs.yml |
| 128 | + parameters: |
| 129 | + BundleId: ${{ parameters.BundleId }} |
| 130 | + PythonVersion: ${{ parameters.PythonVersion }} |
| 131 | + MacosArm64Image: ${{ variables.macos_arm64_pool }} |
| 132 | + MacosIntelImage: ${{ variables.macos_intel_pool }} |
| 133 | + ESRPServiceConnection: ${{ parameters.ESRPServiceConnection }} |
| 134 | + UseCurrentPipelineArtifacts: true |
| 135 | + dependsOn: |
| 136 | + - VerifyMacOSCli |
| 137 | + |
| 138 | +# Jobs included: |
| 139 | +# - DownloadAnalyze (matrix: ARM64 + Intel) |
| 140 | +# - SignBinaries (matrix: ARM64 + Intel) |
| 141 | +# - CreateNotarizeBundle (matrix: ARM64 + Intel) |
| 142 | +# - Notarize (matrix: ARM64 + Intel) |
| 143 | +# - CreateFinalTarball (matrix: ARM64 + Intel) |
| 144 | +# Artifacts: cli-signed-notarized-arm64, cli-signed-notarized-x86_64 |
| 145 | + |
| 146 | +# ============================================================================ |
| 147 | +# PHASE 3a: TEST (local file:// cask + offline install) |
| 148 | +# ============================================================================ |
| 149 | +- ${{ if eq(variables['System.TeamProject'], 'release') }}: |
| 150 | + - template: templates/macos/macos-cask-generation-and-tests.yml |
| 151 | + parameters: |
| 152 | + MacosArm64Image: ${{ variables.macos_arm64_pool }} |
| 153 | + MacosIntelImage: ${{ variables.macos_intel_pool }} |
| 154 | + PythonVersion: ${{ parameters.PythonVersion }} |
| 155 | + GitHubRepo: $(GitHubRepo) |
| 156 | + Debug: ${{ parameters.Debug }} |
| 157 | + dependsOn: |
| 158 | + - CreateFinalTarball |
| 159 | + |
| 160 | +# Jobs included: |
| 161 | +# - TestTempTapCask (matrix: ARM64 + Intel) - tests cask with local file:// URLs |
| 162 | +# - TestOfflineInstall (matrix: ARM64 + Intel) - tests direct tarball install |
| 163 | + |
| 164 | +# ============================================================================ |
| 165 | +# PHASE 3b: PUBLISH (GitHub + Homebrew tap) |
| 166 | +# ============================================================================ |
| 167 | +- ${{ if eq(variables['System.TeamProject'], 'release') }}: |
| 168 | + - template: templates/macos/macos-publish-jobs.yml |
| 169 | + parameters: |
| 170 | + PublishToGitHub: ${{ parameters.PublishToGitHub }} |
| 171 | + UpdateHomebrew: ${{ parameters.UpdateHomebrew }} |
| 172 | + TestAfterPublish: false |
| 173 | + GitHubRepo: $(GitHubRepo) |
| 174 | + GitHubServiceConnection: ${{ parameters.GitHubServiceConnection }} |
| 175 | + HomebrewTapRepo: ${{ parameters.HomebrewTapRepo }} |
| 176 | + MacosArm64Image: ${{ variables.macos_arm64_pool }} |
| 177 | + MacosIntelImage: ${{ variables.macos_intel_pool }} |
| 178 | + PythonVersion: ${{ parameters.PythonVersion }} |
| 179 | + Debug: ${{ parameters.Debug }} |
| 180 | + dependsOn: |
| 181 | + - TestTempTapCask |
| 182 | + - TestOfflineInstall |
| 183 | + |
| 184 | +# Jobs included: |
| 185 | +# - CreateGitHubRelease (conditional) |
| 186 | +# - UpdateHomebrewCask (conditional) |
| 187 | +# - PrintSummary |
| 188 | + |
0 commit comments