2 # Optional: dependencies of the job
5 artifactsDir: $(Build.StagingDirectory)/artifacts
7 gitHubUser: dotnet-build-bot
8 gitHubEmail: dotnet-build-bot@microsoft.com
9 gitHubAuthToken: $(AccessToken-dotnet-build-bot-public-repo)
11 versionsRepoOwner: dotnet
12 versionsRepo: versions
15 - template: /eng/common/templates/job/publish-build-assets.yml
17 configuration: Release
19 name: NetCoreInternal-Pool
20 queue: BuildPool.Windows.10.Amd64.VS2017
21 dependsOn: ${{ parameters.dependsOn }}
22 # Update dotnet/versions
23 - job: Finalize_Publish_Versions
24 displayName: Finalize_Publish_Versions
26 - Asset_Registry_Publish
30 - group: DotNet-Versions-Publish
32 # Download nuget packages
33 # Use parameters.dependsOn to determine the set of nuget packages we are publishing
34 - ${{ each build_id in parameters.dependsOn }}:
35 - task: DownloadPipelineArtifact@0
36 displayName: Download ${{ build_id }} nuget packages
38 artifactName: ${{ build_id }}_nuget
39 targetPath: ${{ parameters.artifactsDir }}/nuget
42 $prefix = "refs/heads/"
43 $branch = "$(Build.SourceBranch)"
45 if ($branchName.StartsWith($prefix))
47 $branchName = $branchName.Substring($prefix.Length)
49 Write-Host "For Build.SourceBranch $branch, FullBranchName is $branchName"
50 Write-Host "##vso[task.setvariable variable=FullBranchName;]$branchName"
51 ls -R ${{ parameters.artifactsDir }}/nuget/*.nupkg
52 $(Build.SourcesDirectory)/UpdatePublishedVersions.ps1 `
53 -gitHubUser ${{ parameters.gitHubUser }} `
54 -gitHubEmail ${{ parameters.gitHubEmail }} `
55 -gitHubAuthToken ${{ parameters.gitHubAuthToken }} `
56 -versionsRepoOwner ${{ parameters.versionsRepoOwner }} `
57 -versionsRepo ${{ parameters.versionsRepo }} `
58 -versionsRepoPath build-info/dotnet/coreclr/$branchName `
59 -nupkgPath ${{ parameters.artifactsDir }}/nuget/*.nupkg
61 displayName: Run UpdatePublishedVersions.ps1
64 displayName: Copy Files to $(Build.StagingDirectory)\BuildLogs
66 SourceFolder: '$(Build.SourcesDirectory)'
70 TargetFolder: '$(Build.StagingDirectory)\BuildLogs'
72 condition: succeededOrFailed()
74 - task: PublishBuildArtifacts@1
75 displayName: Publish Artifact BuildLogs
77 PathtoPublish: '$(Build.StagingDirectory)\BuildLogs'
78 ArtifactName: Finalize_Publish_Versions
79 condition: succeededOrFailed()