|
| 1 | +parameters: |
| 2 | + enableSymbolValidation: true |
| 3 | + |
| 4 | +stages: |
| 5 | +- stage: IS_Publish |
| 6 | + dependsOn: validate |
| 7 | + variables: |
| 8 | + - template: ../common-variables.yml |
| 9 | + displayName: Internal Servicing |
| 10 | + jobs: |
| 11 | + - template: ../setup-maestro-vars.yml |
| 12 | + |
| 13 | + - job: |
| 14 | + displayName: Symbol Publishing |
| 15 | + dependsOn: setupMaestroVars |
| 16 | + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id) |
| 17 | + variables: |
| 18 | + - group: DotNet-Symbol-Server-Pats |
| 19 | + pool: |
| 20 | + vmImage: 'windows-2019' |
| 21 | + steps: |
| 22 | + - task: DownloadBuildArtifacts@0 |
| 23 | + displayName: Download Artifacts |
| 24 | + inputs: |
| 25 | + downloadType: specific files |
| 26 | + matchingPattern: "*Artifacts*" |
| 27 | + |
| 28 | + - task: PowerShell@2 |
| 29 | + displayName: Publish |
| 30 | + inputs: |
| 31 | + filePath: eng\common\sdk-task.ps1 |
| 32 | + arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet |
| 33 | + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
| 34 | + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
| 35 | + /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' |
| 36 | + /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' |
| 37 | + /p:Configuration=Release |
| 38 | + |
| 39 | + - job: |
| 40 | + displayName: Publish Assets |
| 41 | + dependsOn: setupMaestroVars |
| 42 | + variables: |
| 43 | + - group: DotNet-Blob-Feed |
| 44 | + - group: Publish-Build-Assets |
| 45 | + - group: AzureDevOps-Artifact-Feeds-Pats |
| 46 | + - name: BARBuildId |
| 47 | + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
| 48 | + - name: IsStableBuild |
| 49 | + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] |
| 50 | + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id) |
| 51 | + pool: |
| 52 | + vmImage: 'windows-2019' |
| 53 | + steps: |
| 54 | + - task: DownloadBuildArtifacts@0 |
| 55 | + displayName: Download Package Artifacts |
| 56 | + inputs: |
| 57 | + buildType: current |
| 58 | + artifactName: PackageArtifacts |
| 59 | + |
| 60 | + - task: DownloadBuildArtifacts@0 |
| 61 | + displayName: Download Blob Artifacts |
| 62 | + inputs: |
| 63 | + buildType: current |
| 64 | + artifactName: BlobArtifacts |
| 65 | + |
| 66 | + - task: DownloadBuildArtifacts@0 |
| 67 | + displayName: Download Asset Manifests |
| 68 | + inputs: |
| 69 | + buildType: current |
| 70 | + artifactName: AssetManifests |
| 71 | + |
| 72 | + - task: PowerShell@2 |
| 73 | + displayName: Add Assets Location |
| 74 | + env: |
| 75 | + AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-unviersal-packages-rw) |
| 76 | + inputs: |
| 77 | + filePath: eng\common\sdk-task.ps1 |
| 78 | + arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet |
| 79 | + /p:ChannelId=$(InternalServicing_30_Channel_Id) |
| 80 | + /p:IsStableBuild=$(IsStableBuild) |
| 81 | + /p:IsInternalBuild=$(IsInternalBuild) |
| 82 | + /p:RepositoryName=$(Build.Repository.Name) |
| 83 | + /p:CommitSha=$(Build.SourceVersion) |
| 84 | + /p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe |
| 85 | + /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)' |
| 86 | + /p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)' |
| 87 | + /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' |
| 88 | + /p:BARBuildId=$(BARBuildId) |
| 89 | + /p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com' |
| 90 | + /p:BuildAssetRegistryToken='$(MaestroAccessToken)' |
| 91 | + /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' |
| 92 | + /p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts' |
| 93 | + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts' |
| 94 | + /p:Configuration=Release |
| 95 | + |
| 96 | + - task: NuGetCommand@2 |
| 97 | + displayName: Publish Packages to AzDO Feed |
| 98 | + condition: contains(variables['TargetAzDOFeed'], 'pkgs.visualstudio.com') |
| 99 | + inputs: |
| 100 | + command: push |
| 101 | + vstsFeed: $(AzDoFeedName) |
| 102 | + packagesToPush: $(Build.ArtifactStagingDirectory)\PackageArtifacts\*.nupkg |
| 103 | + publishVstsFeed: $(AzDoFeedName) |
| 104 | + |
| 105 | + - task: PowerShell@2 |
| 106 | + displayName: Publish Blobs to AzDO Feed |
| 107 | + inputs: |
| 108 | + filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-blobs-to-azdo.ps1 |
| 109 | + arguments: -FeedName $(AzDoFeedName) |
| 110 | + -SourceFolderCollection $(Build.ArtifactStagingDirectory)/BlobArtifacts/ |
| 111 | + -PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw) |
| 112 | + enabled: false |
| 113 | + |
| 114 | + |
| 115 | +- stage: IS_PublishValidation |
| 116 | + displayName: Publish Validation |
| 117 | + variables: |
| 118 | + - template: ../common-variables.yml |
| 119 | + jobs: |
| 120 | + - template: ../setup-maestro-vars.yml |
| 121 | + |
| 122 | + - ${{ if eq(parameters.enableSymbolValidation, 'true') }}: |
| 123 | + - job: |
| 124 | + displayName: Symbol Availability |
| 125 | + dependsOn: setupMaestroVars |
| 126 | + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id) |
| 127 | + pool: |
| 128 | + vmImage: 'windows-2019' |
| 129 | + steps: |
| 130 | + - task: DownloadBuildArtifacts@0 |
| 131 | + displayName: Download Package Artifacts |
| 132 | + inputs: |
| 133 | + buildType: current |
| 134 | + artifactName: PackageArtifacts |
| 135 | + |
| 136 | + - task: PowerShell@2 |
| 137 | + displayName: Check Symbol Availability |
| 138 | + inputs: |
| 139 | + filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1 |
| 140 | + arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion) |
| 141 | + |
| 142 | + - job: |
| 143 | + displayName: Gather Drop |
| 144 | + dependsOn: setupMaestroVars |
| 145 | + variables: |
| 146 | + BARBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] |
| 147 | + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id) |
| 148 | + pool: |
| 149 | + vmImage: 'windows-2019' |
| 150 | + steps: |
| 151 | + - task: PowerShell@2 |
| 152 | + displayName: Setup Darc CLI |
| 153 | + inputs: |
| 154 | + targetType: filePath |
| 155 | + filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1' |
| 156 | + |
| 157 | + - task: PowerShell@2 |
| 158 | + displayName: Run Darc gather-drop |
| 159 | + inputs: |
| 160 | + targetType: inline |
| 161 | + script: | |
| 162 | + darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com/ --password $(MaestroAccessToken) --latest-location |
| 163 | + enabled: false |
| 164 | + |
| 165 | + - template: ../promote-build.yml |
| 166 | + parameters: |
| 167 | + ChannelId: ${{ variables.InternalServicing_30_Channel_Id }} |
0 commit comments