2019-06-13 12:10:50 +00:00
|
|
|
parameters:
|
2019-08-21 15:32:46 +00:00
|
|
|
artifactsPublishingAdditionalParameters: ''
|
2019-10-24 22:05:36 +00:00
|
|
|
dependsOn:
|
|
|
|
- Validate
|
2019-09-12 17:00:34 +00:00
|
|
|
publishInstallersAndChecksums: false
|
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-13 12:10:50 +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-13 12:10:50 +00:00
|
|
|
variables:
|
|
|
|
- template: ../common-variables.yml
|
2019-11-14 23:21:53 +00:00
|
|
|
displayName: ${{ parameters.channelName }} Publishing
|
2019-06-13 12:10:50 +00:00
|
|
|
jobs:
|
|
|
|
- template: ../setup-maestro-vars.yml
|
|
|
|
|
2019-11-14 23:21:53 +00:00
|
|
|
- job: publish_symbols
|
2019-06-13 12:10:50 +00:00
|
|
|
displayName: Symbol Publishing
|
|
|
|
dependsOn: setupMaestroVars
|
2020-01-30 13:35:10 +00:00
|
|
|
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
2019-06-13 12:10:50 +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-13 12:10:50 +00:00
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2019'
|
|
|
|
steps:
|
|
|
|
- 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-13 12:10:50 +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: |
|
|
|
|
PDBArtifacts/**
|
|
|
|
BlobArtifacts/**
|
|
|
|
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
2019-06-13 12:10:50 +00:00
|
|
|
|
2019-11-02 12:56:53 +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-13 12:10:50 +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-13 12:10:50 +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-13 12:10:50 +00:00
|
|
|
/p:Configuration=Release
|
2019-08-21 15:32:46 +00:00
|
|
|
${{ parameters.symbolPublishingAdditionalParameters }}
|
2019-06-13 12:10:50 +00:00
|
|
|
|
2019-11-14 23:21:53 +00:00
|
|
|
- template: ../../steps/publish-logs.yml
|
|
|
|
parameters:
|
|
|
|
StageLabel: '${{ parameters.stageName }}'
|
|
|
|
JobLabel: 'SymbolPublishing'
|
|
|
|
|
2019-09-10 19:38:53 +00:00
|
|
|
- job: publish_assets
|
2019-06-26 20:33:53 +00:00
|
|
|
displayName: Publish Assets
|
2019-06-13 12:10:50 +00:00
|
|
|
dependsOn: setupMaestroVars
|
|
|
|
variables:
|
|
|
|
- name: BARBuildId
|
|
|
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
2019-06-26 20:33:53 +00:00
|
|
|
- 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'] ]
|
|
|
|
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
2019-06-13 12:10:50 +00:00
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2019'
|
|
|
|
steps:
|
|
|
|
- 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-13 12:10:50 +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)'
|
2019-06-13 12:10:50 +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-13 12:10:50 +00:00
|
|
|
- task: PowerShell@2
|
2019-09-10 19:38:53 +00:00
|
|
|
displayName: Publish Assets
|
2019-06-13 12:10:50 +00:00
|
|
|
inputs:
|
|
|
|
filePath: eng\common\sdk-task.ps1
|
2019-09-10 19:38:53 +00:00
|
|
|
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
2019-07-27 12:35:24 +00:00
|
|
|
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
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)
|
|
|
|
/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
|
2019-08-21 15:32:46 +00:00
|
|
|
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
|
|
|
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
|
|
|
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
|
|
|
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
|
|
|
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
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-08-21 15:32:46 +00:00
|
|
|
${{ parameters.artifactsPublishingAdditionalParameters }}
|
2019-06-28 13:15:43 +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-09-10 19:38:53 +00:00
|
|
|
parameters:
|
2019-11-14 23:21:53 +00:00
|
|
|
ChannelId: ${{ parameters.channelId }}
|