Skip to content

Commit 4201628

Browse files
authored
Merge pull request #1975 from dseefeld/5.0.102
Update to 5.0.102
2 parents eea00e5 + 1f1a487 commit 4201628

File tree

70 files changed

+1302
-504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1302
-504
lines changed

.vsts.pipelines/jobs/ci-linux.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ jobs:
3939
# Default type, can be overridden by matrix legs.
4040
type: ${{ coalesce(parameters.type, 'Production') }}
4141

42+
${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}:
43+
SetInternalPackageFeedPatDockerArg: ''
44+
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
45+
# In the internal build, we have one definition that provides dn-bot-dnceng-artifact-feeds-rw,
46+
# and another that doesn't (to be more like a public build). For the definition that doesn't
47+
# define dn-bot-dnceng-artifact-feeds-rw, this line relies on the subshell to fail when it
48+
# tries to find a command by that name and set internalPackageFeedPat to nothing.
49+
SetInternalPackageFeedPatDockerArg: >-
50+
-e internalPackageFeedPat=$(dn-bot-dnceng-artifact-feeds-rw)
51+
4252
steps:
4353
- template: ../steps/cleanup-unneeded-files.yml
4454
- template: ../steps/docker-cleanup-linux.yml
@@ -62,7 +72,7 @@ jobs:
6272
if [ "$(sb.tarball)" != "true" ]; then
6373
failOnBaselineError=true
6474
fi
65-
$(docker.run) $(docker.src.map) $(docker.src.work) $(imageName) ./build.sh \
75+
$(docker.run) $(docker.src.map) $(docker.src.work) $(SetInternalPackageFeedPatDockerArg) $(imageName) ./build.sh \
6676
/p:Configuration=$(sb.configuration) \
6777
/p:BuildPortableRuntime=$(sb.portable) \
6878
/p:BuildPortableSdk=$(sb.portable) \
@@ -90,7 +100,7 @@ jobs:
90100
- script: |
91101
set -ex
92102
df -h
93-
$(docker.run) $(docker.src.map) $(docker.src.work) $(imageName) ./build.sh \
103+
$(docker.run) $(docker.src.map) $(docker.src.work) $(SetInternalPackageFeedPatDockerArg) $(imageName) ./build.sh \
94104
--run-smoke-test \
95105
/p:Configuration=$(sb.configuration) \
96106
/p:ProdConBlobFeedUrlPrefix=$(prodConBlobFeedUrlPrefix)
@@ -119,7 +129,7 @@ jobs:
119129
if [ "$(reportPrebuiltLeaks)" = "true" ]; then
120130
args="$args --enable-leak-detection"
121131
fi
122-
$(docker.run) $(docker.tb.map) $(docker.src.map) $(docker.src.work) $(imageName) ./build-source-tarball.sh \
132+
$(docker.run) $(docker.tb.map) $(docker.src.map) $(docker.src.work) $(SetInternalPackageFeedPatDockerArg) $(imageName) ./build-source-tarball.sh \
123133
"/tb/$(tarballName)" \
124134
$args
125135
du -h $(rootDirectory) | sort -h | tail -n 50
@@ -224,10 +234,9 @@ jobs:
224234
- script: |
225235
set -ex
226236
df -h
227-
$(docker.run) $(docker.tb.map) $(docker.tb.work) $(imageName) "$(tarballName)/smoke-test.sh" \
228-
--minimal \
229-
--projectOutput \
230-
--configuration $(sb.configuration)
237+
$(docker.run) $(docker.tb.map) $(docker.tb.work) $(imageName) "$(tarballName)/build.sh" \
238+
--run-smoke-test -- \
239+
/p:Configuration=$(sb.configuration)
231240
du -h $(rootDirectory) | sort -h | tail -n 50
232241
displayName: Run smoke-test in tarball
233242
condition: and(succeeded(), eq(variables['sb.tarball'], true))

.vsts.pipelines/jobs/ci-local.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ jobs:
4242
# Default type, can be overridden by matrix legs.
4343
type: Production
4444

45+
${{ if not(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))) }}:
46+
SetInternalPackageFeedPatBashCommand: ''
47+
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
48+
# In the internal build, we have one definition that provides dn-bot-dnceng-artifact-feeds-rw,
49+
# and another that doesn't (to be more like a public build). For the definition that doesn't
50+
# define dn-bot-dnceng-artifact-feeds-rw, this line relies on the subshell to fail when it
51+
# tries to find a command by that name and set internalPackageFeedPat to nothing.
52+
SetInternalPackageFeedPatBashCommand: 'export internalPackageFeedPat=$(dn-bot-dnceng-artifact-feeds-rw)'
53+
4554
steps:
4655
- checkout: self
4756
clean: true
@@ -71,6 +80,9 @@ jobs:
7180

7281
# Build source-build.
7382
- script: |
83+
set -x
84+
$(SetInternalPackageFeedPatBashCommand)
85+
set -e
7486
${{ format('{0}build{1} $(args.build)', parameters.scriptPrefix, parameters.scriptSuffix) }}
7587
displayName: Build source-build
7688
timeoutInMinutes: 150
@@ -79,7 +91,11 @@ jobs:
7991

8092
# Run smoke tests.
8193
- ${{ if ne(parameters.skipSmokeTest, true) }}:
82-
- bash: ${{ format('{0}build{1} $(args.smokeTest)', parameters.scriptPrefix, parameters.scriptSuffix) }}
94+
- bash: |
95+
set -x
96+
$(SetInternalPackageFeedPatBashCommand)
97+
set -e
98+
${{ format('{0}build{1} $(args.smokeTest)', parameters.scriptPrefix, parameters.scriptSuffix) }}
8399
displayName: Run smoke-test
84100
85101
# Gather artifacts. Uses git bash on Windows.

.vsts.pipelines/steps/run-bootstrap.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,14 @@ steps:
163163
condition: always()
164164
continueOnError: true
165165

166-
# Copy final-stage tarball artifactss and sdk tarball to drop directory.
166+
# Copy final-stage tarball artifacts and sdk tarball to drop directory.
167167
- script: |
168168
set -ex
169169
df -h
170170
$(docker.run) $(docker.bst.map) $(docker.drop.map) $(docker.bst.work) $(imageName) /bin/bash -c "
171171
mkdir -p /drop/tarball/final
172172
pushd /bst/bootstrap_dir/final-sdk
173-
find ./bin \( \
173+
find ./artifacts \( \
174174
-iname 'dotnet-sdk*.tar.gz' -o \
175175
-iname 'Private.SourceBuilt.Artifacts*.tar.gz' \) \
176176
-exec cp {} /drop/tarball/final \;"
@@ -195,7 +195,10 @@ steps:
195195
df -h
196196
$(docker.run) $(docker.bst.map) $(docker.bst.work) $(imageName) bash -c "
197197
pushd /bst/bootstrap_dir/final-sdk
198-
./smoke-test.sh --prodConBlobFeedUrl ''"
198+
./build.sh \
199+
--run-smoke-test \
200+
--with-packages /bst/bootstrap_dir/stage1-source-built-artifacts-install/ \
201+
--with-sdk /bst/bootstrap_dir/stage1-sdk-install/"
199202
displayName: Smoke-test final SDK
200203
condition: always()
201204

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
<OfflinePrebuiltBurndownDataFile>$(PackageReportDir)PrebuiltBurndownData-offline.csv</OfflinePrebuiltBurndownDataFile>
156156
<OnlinePrebuiltBurndownDataFile>$(PackageReportDir)PrebuiltBurndownData-online.csv</OnlinePrebuiltBurndownDataFile>
157157
<ReferencePackagesBaseDir>$(IntermediatePath)reference-packages/</ReferencePackagesBaseDir>
158+
<TextOnlyPackageBaseDir>$(IntermediatePath)text-only-packages/</TextOnlyPackageBaseDir>
158159
<ExternalTarballsDir>$(IntermediatePath)external-tarballs/</ExternalTarballsDir>
159160
<!--
160161
Change ReferencePackagesBaseDir & ExternalTarballsDir conditionally in offline build.
@@ -163,6 +164,7 @@
163164
-->
164165
<ExternalTarballsDir Condition="'$(OfflineBuild)' == 'true'">$(ProjectDir)packages/archive/</ExternalTarballsDir>
165166
<ReferencePackagesBaseDir Condition="'$(OfflineBuild)' == 'true'">$(ProjectDir)packages/reference/</ReferencePackagesBaseDir>
167+
<TextOnlyPackageBaseDir Condition="'$(OfflineBuild)' == 'true'">$(ProjectDir)packages/text-only/</TextOnlyPackageBaseDir>
166168
<ReferencePackagesDir>$(ReferencePackagesBaseDir)packages/</ReferencePackagesDir>
167169
<ReferencePackagesDir Condition="'$(CustomReferencePackagesPath)' != ''">$(CustomReferencePackagesPath)/</ReferencePackagesDir>
168170
<SourceBuiltArtifactsTarballName>Private.SourceBuilt.Artifacts</SourceBuiltArtifactsTarballName>

NuGet.config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
66
<add key="darc-pub-dotnet-templating-3198063" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-templating-31980633/nuget/v3/index.json" />
7-
<add key="darc-pub-dotnet-runtime-cf258a1-1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-cf258a14-1/nuget/v3/index.json" />
87
<add key="darc-pub-dotnet-msbuild-126527f" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-msbuild-126527ff/nuget/v3/index.json" />
9-
<add key="darc-pub-dotnet-aspnetcore-371a26f" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-aspnetcore-371a26f0/nuget/v3/index.json" />
108
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
119
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
1210
<add key="nuget-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />

build.proj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@
153153
This is also a problem when passing CLI feeds: https://github.com/dotnet/source-build/issues/561
154154
-->
155155
<Exec Command="$(SmokeTestCommand)"
156-
EnvironmentVariables="prodConBlobFeedUrl=$(ProdConBlobFeedUrl)" />
156+
EnvironmentVariables="
157+
targetRid=$(TargetRid);
158+
prodConBlobFeedUrl=$(ProdConBlobFeedUrl)" />
157159
</Target>
158160

159161
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="UploadToAzure" />

build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
102102
export DOTNET_MULTILEVEL_LOOKUP=0
103103
export NUGET_PACKAGES="$scriptroot/packages/restored/"
104104

105+
if [ "${internalPackageFeedPat:-}" ]; then
106+
echo "Setting up NuGet credential provider using PAT from env var 'internalPackageFeedPat'..."
107+
. "$scriptroot/eng/install-nuget-credprovider.sh"
108+
# TODO: Read these from nuget.config
109+
# The internal transport isn't added by Darc, though, so it will still need special-casing.
110+
export VSS_NUGET_EXTERNAL_FEED_ENDPOINTS='{"endpointCredentials": [
111+
{"endpoint":"https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-runtime-cb5f173b/nuget/v3/index.json", "username":"optional", "password":"'$internalPackageFeedPat'"},
112+
{"endpoint":"https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-aspnetcore-2670c128/nuget/v3/index.json", "username":"optional", "password":"'$internalPackageFeedPat'"},
113+
{"endpoint":"https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-installer-71365b4d/nuget/v3/index.json", "username":"optional", "password":"'$internalPackageFeedPat'"},
114+
{"endpoint":"https://pkgs.dev.azure.com/dnceng/internal/_packaging/5.0.102-servicing.20614.17/nuget/v3/index.json", "username":"optional", "password":"'$internalPackageFeedPat'"},
115+
{"endpoint":"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v3/index.json", "username":"optional", "password":"'$internalPackageFeedPat'"}
116+
]}'
117+
fi
118+
105119
set -x
106120
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
107121

eng/SourceBuild.Tarball.AllowedPrebuilts.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<Target Name="AllowWorkInProgressPrebuilts"
44
BeforeTargets="ForbidPrebuilts">
55
<ItemGroup>
6-
<AllowedPrebuiltPackageFile/>
6+
<!-- Example: $(TarballPrebuiltPackageDir)microsoft.dotnet.web.itemtemplates.5.0.2.nupkg -->
7+
<AllowedPrebuiltPackageFile />
78
</ItemGroup>
89
</Target>
910

eng/SourceBuild.Tarball.KnownExtraPrebuilts.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
$(TarballPrebuiltPackageDir)microsoft.dotnet.arcade.sdk.5.0.0-beta.20426.4.nupkg;
3232
$(TarballPrebuiltPackageDir)microsoft.dotnet.signtool.5.0.0-beta.20426.4.nupkg;
3333
$(TarballPrebuiltPackageDir)microsoft.extensions.dependencymodel.3.1.6.nupkg;
34+
$(TarballPrebuiltPackageDir)microsoft.extensions.dependencyinjection.5.0.0.nupkg;
3435
$(TarballPrebuiltPackageDir)microsoft.netcore.app.host.linux-x64.3.1.7.nupkg;
3536
$(TarballPrebuiltPackageDir)microsoft.symboluploader.build.task.1.1.141804.nupkg;
3637
$(TarballPrebuiltPackageDir)netstandard.library.1.6.0.nupkg;
@@ -89,12 +90,15 @@
8990
$(TarballPrebuiltPackageDir)system.composition.hosting.1.0.31.nupkg;
9091
$(TarballPrebuiltPackageDir)system.composition.runtime.1.0.31.nupkg;
9192
$(TarballPrebuiltPackageDir)system.composition.typedparts.1.0.31.nupkg;
93+
$(TarballPrebuiltPackageDir)system.io.pipelines.5.0.0.nupkg;
9294
$(TarballPrebuiltPackageDir)system.reflection.metadata.5.0.0-preview.8.20407.11.nupkg;
9395
$(TarballPrebuiltPackageDir)system.runtime.compilerservices.unsafe.5.0.0-rc.1.20451.14.nupkg;
96+
$(TarballPrebuiltPackageDir)system.security.cryptography.pkcs.5.0.0.nupkg;
9497
$(TarballPrebuiltPackageDir)system.text.encodings.web.4.7.1.nupkg;
9598
$(TarballPrebuiltPackageDir)system.text.encodings.web.5.0.0-rc.1.20451.14.nupkg;
9699
$(TarballPrebuiltPackageDir)system.text.json.4.7.2.nupkg;
97100
$(TarballPrebuiltPackageDir)system.text.json.5.0.0-rc.1.20451.14.nupkg;
101+
$(TarballPrebuiltPackageDir)system.text.json.5.0.0.nupkg;
98102
$(TarballPrebuiltPackageDir)system.valuetuple.4.3.0.nupkg;
99103
$(TarballPrebuiltPackageDir)system.xml.xpath.xmldocument.4.0.1.nupkg;
100104
$(TarballPrebuiltPackageDir)vswhere.2.6.7.nupkg;
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<Project>
2+
3+
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceTextInFile" />
4+
5+
<!--
6+
Find text-only nupkgs and decompose them into text files to include in the tarball as source
7+
code. This simplifies maintenance by removing the need to put a new version of these files in
8+
dotnet/source-build-reference-packages for potentially every single servicing release.
9+
10+
'dotnet new' template packages are a prominent example of text-only packages that change often.
11+
-->
12+
<Target Name="AddAllUnpackedTextOnlyPackageSource"
13+
DependsOnTargets="GetTarballDirProps"
14+
BeforeTargets="AddTarballPackages">
15+
<PropertyGroup>
16+
<TarballUnpackedTextOnlyPackageSourceDir>$([MSBuild]::NormalizeDirectory('$(TarballRootDir)', 'packages', 'text-only'))</TarballUnpackedTextOnlyPackageSourceDir>
17+
</PropertyGroup>
18+
19+
<!--
20+
Find .nupkg files in package cache in order to locate the extraction directory, then filter
21+
which files are copied to the tarball to exclude the nupkg itself and unnecessary metadata.
22+
-->
23+
<ItemGroup>
24+
<TextOnlyPrebuiltNupkgFile Include="
25+
$(ProjectDir)packages\restored\**\microsoft.dotnet.web.itemtemplates.5.0.*.nupkg;
26+
$(ProjectDir)packages\restored\**\microsoft.dotnet.web.projecttemplates.5.0.5.0.*.nupkg;
27+
$(ProjectDir)packages\restored\**\microsoft.dotnet.web.spa.projecttemplates.5.0.5.0.*.nupkg;
28+
" />
29+
30+
<!-- Make prebuilt nupkg copy logic ignore these text-only nupkgs. -->
31+
<RefOnlyPackageFilename Include="@(TextOnlyPrebuiltNupkgFile->'%(Filename)')" />
32+
33+
<TextOnlyPrebuiltNupkgProject
34+
Include="$(MSBuildProjectFullPath)"
35+
Properties="
36+
TextOnlyPackageRootDir=%(TextOnlyPrebuiltNupkgFile.RootDir)%(TextOnlyPrebuiltNupkgFile.Directory)" />
37+
</ItemGroup>
38+
39+
<MSBuild
40+
Projects="@(TextOnlyPrebuiltNupkgProject)"
41+
Targets="AddUnpackedTextOnlyPackageSource">
42+
<Output TaskParameter="TargetOutputs" ItemName="TarballCopyFile" />
43+
</MSBuild>
44+
</Target>
45+
46+
<Target Name="AddUnpackedTextOnlyPackageSource"
47+
DependsOnTargets="GetTarballDirProps"
48+
Returns="@(TarballCopyFile)">
49+
<PropertyGroup>
50+
<PackageVersionDirFile>$([System.IO.Path]::GetDirectoryName('$(TextOnlyPackageRootDir)'))</PackageVersionDirFile>
51+
<PackageIdDirFile>$([System.IO.Path]::GetDirectoryName('$(PackageVersionDirFile)'))</PackageIdDirFile>
52+
<PackageVersion>$([System.IO.Path]::GetFileName('$(PackageVersionDirFile)'))</PackageVersion>
53+
<PackageId>$([System.IO.Path]::GetFileName('$(PackageIdDirFile)'))</PackageId>
54+
55+
<PackageIntermediateDir>$([MSBuild]::NormalizeDirectory('$(TextOnlyPackageBaseDir)', '$(PackageId)', '$(PackageVersion)'))</PackageIntermediateDir>
56+
</PropertyGroup>
57+
58+
<MakeDir Directories="$(PackageIntermediateDir)" />
59+
60+
<ItemGroup>
61+
<NuspecFile Include="$(TextOnlyPackageRootDir)*.nuspec" />
62+
<PackableNuspecFile Include="@(NuspecFile->'$(PackageIntermediateDir)%(Filename)%(Extension)')" />
63+
</ItemGroup>
64+
65+
<Error Condition="@(NuspecFile->Count()) != 1" Text="Expected exactly one nuspec file in $(TextOnlyPackageRootDir)" />
66+
67+
<Copy SourceFiles="@(NuspecFile)" DestinationFiles="@(PackableNuspecFile)" />
68+
69+
<ReplaceTextInFile
70+
InputFile="@(PackableNuspecFile)"
71+
OldText="&lt;/package&gt;"
72+
NewText="&lt;files&gt;&lt;file src=&quot;.\**\*&quot;/&gt;&lt;/files&gt;&lt;/package&gt;" />
73+
74+
<ItemGroup>
75+
<TextOnlyPackageContentFile
76+
Include="
77+
$(TextOnlyPackageRootDir)**;
78+
$(PackageIntermediateDir)**"
79+
Exclude="
80+
@(NuspecFile);
81+
$(TextOnlyPackageRootDir)**\.nupkg.metadata;
82+
$(TextOnlyPackageRootDir)**\.signature.p7s;
83+
$(TextOnlyPackageRootDir)**\*.nupkg;
84+
$(TextOnlyPackageRootDir)**\*.nupkg.sha512" />
85+
86+
<TarballCopyFile
87+
Include="@(TextOnlyPackageContentFile)"
88+
RelativeDestination="packages\text-only\$(PackageId)\$(PackageVersion)\%(RecursiveDir)%(Filename)%(Extension)" />
89+
</ItemGroup>
90+
</Target>
91+
92+
</Project>

0 commit comments

Comments
 (0)