2019-06-26 20:33:53 +00:00
parameters :
2020-08-21 13:01:23 +00:00
BARBuildId : ''
PromoteToChannelIds : ''
2019-08-21 15:32:46 +00:00
artifactsPublishingAdditionalParameters : ''
2019-10-24 22:05:36 +00:00
dependsOn :
- Validate
2020-09-05 12:49:59 +00:00
publishInstallersAndChecksums : true
2019-10-24 22:05:36 +00:00
symbolPublishingAdditionalParameters : ''
2019-11-14 23:21:53 +00:00
stageName : ''
channelName : ''
channelId : ''
transportFeed : ''
shippingFeed : ''
symbolsFeed : ''
2019-06-26 20:33:53 +00:00
stages :
2019-11-14 23:21:53 +00:00
- stage : ${{ parameters.stageName }}
2019-10-24 22:05:36 +00:00
dependsOn : ${{ parameters.dependsOn }}
2019-06-26 20:33:53 +00:00
variables :
- template : ../common-variables.yml
2019-11-14 23:21:53 +00:00
displayName : ${{ parameters.channelName }} Publishing
2019-06-26 20:33:53 +00:00
jobs :
- template : ../setup-maestro-vars.yml
2020-08-21 13:01:23 +00:00
parameters :
BARBuildId : ${{ parameters.BARBuildId }}
PromoteToChannelIds : ${{ parameters.PromoteToChannelIds }}
2019-06-26 20:33:53 +00:00
2019-11-14 23:21:53 +00:00
- job : publish_symbols
2019-06-26 20:33:53 +00:00
displayName : Symbol Publishing
dependsOn : setupMaestroVars
2020-04-24 17:34:25 +00:00
condition : contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} ))
2019-06-26 20:33:53 +00:00
variables :
- group : DotNet-Symbol-Server-Pats
2020-01-30 13:35:10 +00:00
- name : AzDOProjectName
value : $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
- name : AzDOPipelineId
value : $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
- name : AzDOBuildId
value : $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
2019-06-26 20:33:53 +00:00
pool :
vmImage : 'windows-2019'
steps :
2021-05-25 13:46:43 +00:00
- script : echo "##vso[task.logissue type=warning]Going forward, v2 Arcade publishing is no longer supported. Please read https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md for details, then contact dnceng if you have further questions."
displayName : Warn about v2 Arcade Publishing Usage
2020-07-16 02:58:19 +00:00
# This is necessary whenever we want to publish/restore to an AzDO private feed
- task : NuGetAuthenticate@0
displayName : 'Authenticate to AzDO Feeds'
2019-06-26 20:33:53 +00:00
- task : DownloadBuildArtifacts@0
2020-01-07 13:31:30 +00:00
displayName : Download Build Assets
2019-08-21 15:32:46 +00:00
continueOnError : true
2019-06-26 20:33:53 +00:00
inputs :
2020-01-30 13:35:10 +00:00
buildType : specific
buildVersionToDownload : specific
project : $(AzDOProjectName)
pipeline : $(AzDOPipelineId)
buildId : $(AzDOBuildId)
2020-01-07 13:31:30 +00:00
downloadType : 'specific'
itemPattern : |
2020-02-08 00:51:24 +00:00
PdbArtifacts/**
2020-01-07 13:31:30 +00:00
BlobArtifacts/**
downloadPath : '$(Build.ArtifactStagingDirectory)'
2021-03-11 13:55:56 +00:00
checkDownloadedFiles : true
2019-06-26 20:33:53 +00:00
2019-10-24 22:05:36 +00:00
# This is necessary whenever we want to publish/restore to an AzDO private feed
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
# otherwise it'll complain about accessing a private feed.
- task : NuGetAuthenticate@0
displayName : 'Authenticate to AzDO Feeds'
- task : PowerShell@2
displayName : Enable cross-org publishing
inputs :
filePath : eng\common\enable-cross-org-publishing.ps1
arguments : -token $(dn-bot-dnceng-artifact-feeds-rw)
2019-06-26 20:33:53 +00:00
- task : PowerShell@2
displayName : Publish
inputs :
filePath : eng\common\sdk-task.ps1
arguments : -task PublishToSymbolServers -restore -msbuildEngine dotnet
2019-09-10 19:38:53 +00:00
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
2019-06-26 20:33:53 +00:00
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
2019-08-21 15:32:46 +00:00
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
2019-06-26 20:33:53 +00:00
/p:Configuration=Release
2019-10-31 13:02:24 +00:00
/p:PublishToMSDL=false
2019-08-21 15:32:46 +00:00
${{ parameters.symbolPublishingAdditionalParameters }}
2019-06-26 20:33:53 +00:00
2019-11-14 23:21:53 +00:00
- template : ../../steps/publish-logs.yml
parameters :
StageLabel : '${{ parameters.stageName }}'
JobLabel : 'SymbolPublishing'
2019-06-28 13:15:43 +00:00
- job : publish_assets
2019-06-26 20:33:53 +00:00
displayName : Publish Assets
dependsOn : setupMaestroVars
2020-02-26 13:35:21 +00:00
timeoutInMinutes : 120
2019-06-26 20:33:53 +00:00
variables :
- name : BARBuildId
value : $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- name : IsStableBuild
value : $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
2020-01-30 13:35:10 +00:00
- name : AzDOProjectName
value : $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
- name : AzDOPipelineId
value : $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
- name : AzDOBuildId
value : $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
2020-04-24 17:34:25 +00:00
condition : contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} ))
2019-06-26 20:33:53 +00:00
pool :
vmImage : 'windows-2019'
steps :
2021-05-25 13:46:43 +00:00
- script : echo "##vso[task.logissue type=warning]Going forward, v2 Arcade publishing is no longer supported. Please read https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md for details, then contact dnceng if you have further questions."
displayName : Warn about v2 Arcade Publishing Usage
2019-06-26 20:33:53 +00:00
- task : DownloadBuildArtifacts@0
2020-01-07 13:31:30 +00:00
displayName : Download Build Assets
2019-10-30 12:42:17 +00:00
continueOnError : true
2019-06-26 20:33:53 +00:00
inputs :
2020-01-30 13:35:10 +00:00
buildType : specific
buildVersionToDownload : specific
project : $(AzDOProjectName)
pipeline : $(AzDOPipelineId)
buildId : $(AzDOBuildId)
2020-01-07 13:31:30 +00:00
downloadType : 'specific'
itemPattern : |
PackageArtifacts/**
BlobArtifacts/**
AssetManifests/**
downloadPath : '$(Build.ArtifactStagingDirectory)'
2021-03-11 13:55:56 +00:00
checkDownloadedFiles : true
2019-06-26 20:33:53 +00:00
2019-09-10 19:38:53 +00:00
- task : NuGetToolInstaller@1
displayName : 'Install NuGet.exe'
# This is necessary whenever we want to publish/restore to an AzDO private feed
- task : NuGetAuthenticate@0
displayName : 'Authenticate to AzDO Feeds'
2019-09-26 21:15:58 +00:00
- task : PowerShell@2
displayName : Enable cross-org publishing
inputs :
filePath : eng\common\enable-cross-org-publishing.ps1
arguments : -token $(dn-bot-dnceng-artifact-feeds-rw)
2019-06-26 20:33:53 +00:00
- task : PowerShell@2
2019-09-10 19:38:53 +00:00
displayName : Publish Assets
2019-06-26 20:33:53 +00:00
inputs :
filePath : eng\common\sdk-task.ps1
2019-09-12 17:00:34 +00:00
arguments : -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
2020-08-21 13:01:23 +00:00
/p:PublishingInfraVersion=2
2019-06-26 20:33:53 +00:00
/p:IsStableBuild=$(IsStableBuild)
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)
/p:CommitSha=$(Build.SourceVersion)
2019-09-10 19:38:53 +00:00
/p:NugetPath=$(NuGetExeToolPath)
2019-09-12 17:00:34 +00:00
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
/p:BARBuildId=$(BARBuildId)
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
/p:Configuration=Release
2020-09-05 12:49:59 +00:00
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
2019-09-12 17:00:34 +00:00
/p:ChecksumsTargetStaticFeed=$(InternalChecksumsBlobFeedUrl)
2019-09-13 08:10:56 +00:00
/p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey)
2019-09-12 17:00:34 +00:00
/p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl)
2019-09-13 08:10:56 +00:00
/p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey)
2019-11-14 23:21:53 +00:00
/p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
2019-09-12 17:00:34 +00:00
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
2019-11-14 23:21:53 +00:00
/p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
2019-09-12 17:00:34 +00:00
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
2019-11-14 23:21:53 +00:00
/p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}'
2019-09-12 17:00:34 +00:00
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
2019-11-14 23:21:53 +00:00
/p:PublishToMSDL=false
2019-08-21 15:32:46 +00:00
${{ parameters.artifactsPublishingAdditionalParameters }}
2019-06-26 20:33:53 +00:00
2019-11-14 23:21:53 +00:00
- template : ../../steps/publish-logs.yml
parameters :
StageLabel : '${{ parameters.stageName }}'
JobLabel : 'AssetsPublishing'
2020-01-30 13:35:10 +00:00
- template : ../../steps/add-build-to-channel.yml
2019-06-28 13:15:43 +00:00
parameters :
2019-11-14 23:21:53 +00:00
ChannelId : ${{ parameters.channelId }}