Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 270a666

Browse files
author
dotnet-maestro
committed
Update dependencies from https://github.com/dotnet/arcade build 20190626.44
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19326.44 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19326.44 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19326.44 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19326.44
1 parent da8651b commit 270a666

18 files changed

+585
-76
lines changed

eng/Version.Details.xml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
21
<Dependencies>
32
<ProductDependencies>
43
</ProductDependencies>
54
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19324.24">
5+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19326.44">
76
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>062febd818fa51e82c7192782a6b6e6429cc81c8</Sha>
7+
<Sha>d39a62deaf3aa4e03c0b7dadc320a517e0e00187</Sha>
98
</Dependency>
10-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19324.24">
9+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19326.44">
1110
<Uri>https://github.com/dotnet/arcade</Uri>
12-
<Sha>062febd818fa51e82c7192782a6b6e6429cc81c8</Sha>
11+
<Sha>d39a62deaf3aa4e03c0b7dadc320a517e0e00187</Sha>
1312
</Dependency>
14-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19324.24">
13+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.19326.44">
1514
<Uri>https://github.com/dotnet/arcade</Uri>
16-
<Sha>062febd818fa51e82c7192782a6b6e6429cc81c8</Sha>
15+
<Sha>d39a62deaf3aa4e03c0b7dadc320a517e0e00187</Sha>
1716
</Dependency>
18-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.19324.24">
17+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.19326.44">
1918
<Uri>https://github.com/dotnet/arcade</Uri>
20-
<Sha>062febd818fa51e82c7192782a6b6e6429cc81c8</Sha>
19+
<Sha>d39a62deaf3aa4e03c0b7dadc320a517e0e00187</Sha>
2120
</Dependency>
2221
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.6.0-preview7.19326.2">
2322
<Uri>https://github.com/dotnet/corefx</Uri>

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<UsingToolXliff>false</UsingToolXliff>
1515
<!-- Package versions -->
1616
<!-- arcade -->
17-
<MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19324.24</MicrosoftDotNetBuildTasksFeedVersion>
18-
<MicrosoftDotNetBuildTasksPackagingVersion>1.0.0-beta.19324.24</MicrosoftDotNetBuildTasksPackagingVersion>
17+
<MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19326.44</MicrosoftDotNetBuildTasksFeedVersion>
18+
<MicrosoftDotNetBuildTasksPackagingVersion>1.0.0-beta.19326.44</MicrosoftDotNetBuildTasksPackagingVersion>
1919
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.19278.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
2020
<!-- corefx -->
2121
<MicrosoftPrivateCoreFxNETCoreAppVersion>4.6.0-preview7.19326.2</MicrosoftPrivateCoreFxNETCoreAppVersion>

eng/common/build.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ try {
133133
Build
134134
}
135135
catch {
136-
Write-Host $_
137-
Write-Host $_.Exception
138136
Write-Host $_.ScriptStackTrace
139137
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
140138
ExitWithExitCode 1

eng/common/build.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ if [[ -n "${useInstalledDotNetCli:-}" ]]; then
209209
use_installed_dotnet_cli="$useInstalledDotNetCli"
210210
fi
211211

212-
# Workaround for https://github.com/dotnet/arcade/issues/2673
213-
# if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
214-
# InitializeNativeTools
215-
# fi
212+
if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
213+
InitializeNativeTools
214+
fi
216215

217216
Build
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
param(
2+
[Parameter(Mandatory=$true)][int] $BuildId,
3+
[Parameter(Mandatory=$true)][int] $ChannelId,
4+
[Parameter(Mandatory=$true)][string] $BarToken,
5+
[string] $MaestroEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com",
6+
[string] $ApiVersion = "2019-01-16"
7+
)
8+
9+
$ErrorActionPreference = "Stop"
10+
Set-StrictMode -Version 2.0
11+
12+
. $PSScriptRoot\..\tools.ps1
13+
14+
function Get-Headers([string]$accept, [string]$barToken) {
15+
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
16+
$headers.Add('Accept',$accept)
17+
$headers.Add('Authorization',"Bearer $barToken")
18+
return $headers
19+
}
20+
21+
try {
22+
$maestroHeaders = Get-Headers 'application/json' $BarToken
23+
24+
# Get info about which channels the build has already been promoted to
25+
$getBuildApiEndpoint = "$MaestroEndpoint/api/builds/${BuildId}?api-version=$ApiVersion"
26+
$buildInfo = Invoke-WebRequest -Method Get -Uri $getBuildApiEndpoint -Headers $maestroHeaders | ConvertFrom-Json
27+
28+
if (!$buildInfo) {
29+
Write-Host "Build with BAR ID $BuildId was not found in BAR!"
30+
ExitWithExitCode 1
31+
}
32+
33+
# Find whether the build is already assigned to the channel or not
34+
if ($buildInfo.channels) {
35+
foreach ($channel in $buildInfo.channels) {
36+
if ($channel.Id -eq $ChannelId) {
37+
Write-Host "The build with BAR ID $BuildId is already on channel $ChannelId!"
38+
ExitWithExitCode 0
39+
}
40+
}
41+
}
42+
43+
Write-Host "Build not present in channel $ChannelId. Promoting build ... "
44+
45+
$promoteBuildApiEndpoint = "$maestroEndpoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$ApiVersion"
46+
Invoke-WebRequest -Method Post -Uri $promoteBuildApiEndpoint -Headers $maestroHeaders
47+
Write-Host "done."
48+
}
49+
catch {
50+
Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
51+
Write-Host $_
52+
Write-Host $_.ScriptStackTrace
53+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
param(
2+
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where artifact packages are stored
3+
[Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted
4+
)
5+
6+
$ErrorActionPreference = "Stop"
7+
Set-StrictMode -Version 2.0
8+
$ExtractPackage = {
9+
param(
10+
[string] $PackagePath # Full path to a NuGet package
11+
)
12+
13+
if (!(Test-Path $PackagePath)) {
14+
Write-PipelineTaskError "Input file does not exist: $PackagePath"
15+
ExitWithExitCode 1
16+
}
17+
18+
$RelevantExtensions = @(".dll", ".exe", ".pdb")
19+
Write-Host -NoNewLine "Extracting" ([System.IO.Path]::GetFileName($PackagePath)) "... "
20+
21+
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
22+
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
23+
24+
Add-Type -AssemblyName System.IO.Compression.FileSystem
25+
26+
[System.IO.Directory]::CreateDirectory($ExtractPath);
27+
28+
try {
29+
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
30+
31+
$zip.Entries |
32+
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
33+
ForEach-Object {
34+
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
35+
36+
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
37+
}
38+
}
39+
catch {
40+
41+
}
42+
finally {
43+
$zip.Dispose()
44+
}
45+
}
46+
function ExtractArtifacts {
47+
$Jobs = @()
48+
Get-ChildItem "$InputPath\*.nupkg" |
49+
ForEach-Object {
50+
$Jobs += Start-Job -ScriptBlock $ExtractPackage -ArgumentList $_.FullName
51+
}
52+
53+
foreach ($Job in $Jobs) {
54+
Wait-Job -Id $Job.Id | Receive-Job
55+
}
56+
}
57+
58+
try {
59+
Measure-Command { ExtractArtifacts }
60+
}
61+
catch {
62+
Write-Host $_
63+
Write-Host $_.Exception
64+
Write-Host $_.ScriptStackTrace
65+
ExitWithExitCode 1
66+
}

eng/common/templates/job/execute-sdl.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ jobs:
2020
downloadType: specific files
2121
matchingPattern: "**"
2222
downloadPath: $(Build.SourcesDirectory)\artifacts
23+
- powershell: eng/common/sdl/extract-artifact-packages.ps1
24+
-InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
25+
-ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
26+
displayName: Extract Blob Artifacts
27+
continueOnError: ${{ parameters.continueOnError }}
28+
- powershell: eng/common/sdl/extract-artifact-packages.ps1
29+
-InputPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
30+
-ExtractPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
31+
displayName: Extract Package Artifacts
32+
continueOnError: ${{ parameters.continueOnError }}
2333
- task: NuGetToolInstaller@1
2434
displayName: 'Install NuGet.exe'
2535
- task: NuGetCommand@2

eng/common/templates/job/publish-build-assets.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ jobs:
6666
script: |
6767
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId)
6868
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)"
69-
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsInternalBuild)
7069
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild)
7170
- task: PublishBuildArtifacts@1
7271
displayName: Publish ReleaseConfigs Artifact
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
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

Comments
 (0)