Skip to content

Commit 04705ee

Browse files
authoredSep 11, 2019
Use stages pipeline (#13040)
- #11924 - change ci.yml to use stages and post-build.yml - add use of publish-build-assets.yml and post-build.yml - create manifests and push to artifacts in last build step of each job - pass more MSBuild properties into those builds - use Arcade to publish installers - use distinct `$(AssetManifestFileName)` values per job - set global property to override what's hard-coded in Publish.proj - change codesign-xplat.yml to use empty.proj and normal Arcade signing and publication process - remove XPlatPackageSigner.proj - change default-build.yml to use job.yml - remove unused parameters e.g. `matrix`, `poolName`, `variables` - use `enableMicrobuild` and `enablePublishTestResults` to eliminate duplicate build steps - add .dll's and .exe's as files to sign w/ Microsoft400 - add signcheck exclusions - remove custom manifest generation i.e. the `GenerateBuildAssetManifest` target and related artifacts - update docker infrastructure to use same paths in and out of the container - avoids problems adding to artifacts from within the builds - correct typo in build.sh - use `$env:DOTNET_INSTALL_DIR` in `DotNetCommands` - relax expectations that an arch-specific folder exists under (say) `$env:DOTNET_HOME` - avoids need to define `$env:DOTNET_HOME` in all jobs on CI - update dependencies from dotnet/arcade build '20190908.2' - upgrade to eg. Arcade SDK '1.0.0-beta.19458.2' package version - pick up dotnet/arcade@dd593acc8b08 fix - enable use of `%(PublishFlatContainer)` metadata and correct signing validation issues - use `$(DotNetFinalVersionKind)` in preparation for servicing builds - set `$(IsStableBuild)` for use in Arcade infrastructure - disable signing validation for now (see #13864) nits: - upload logs in first artifact - remove attempts to package non-existent VSIX - follow-up to 29cf7ec - respect verbosity setting in build.sh - add more information to Artifacts.md - enable test signing in internal PRs
1 parent 1b83f7d commit 04705ee

25 files changed

+877
-821
lines changed
 

‎.azure/pipelines/ci.yml

+547-491
Large diffs are not rendered by default.

‎.azure/pipelines/jobs/codesign-xplat.yml

+23-6
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,30 @@ jobs:
1919
displayName: Download ${{ parameters.inputName }} artifacts
2020
inputs:
2121
artifactName: ${{ parameters.inputName }}_Packages
22-
downloadPath: $(Build.StagingDirectory)/deps/
22+
downloadPath: $(Build.StagingDirectory)/downloaded_packages/
2323
itemPattern: '**/*.nupkg'
24-
- task: MSBuild@1
25-
displayName: Code-sign .nupkg files
24+
- task: CopyFiles@2
25+
displayName: Copy packages to ArtifactsShippingPackagesDir
2626
inputs:
27-
solution: eng\tools\XplatPackageSigner\XplatPackageSigner.proj
28-
msbuildArguments: /p:SignType=$(_SignType) /p:DirectoryToSign=$(Build.StagingDirectory)\deps\${{ parameters.inputName }}_Packages\
27+
sourceFolder: $(Build.StagingDirectory)/downloaded_packages/
28+
contents: '**/*.nupkg'
29+
targetFolder: $(Build.SourcesDirectory)/artifacts/packages/$(BuildConfiguration)/shipping/
30+
flattenFolders: true
31+
- powershell: .\eng\common\build.ps1
32+
-ci
33+
-restore
34+
-sign
35+
-publish
36+
-configuration $(BuildConfiguration)
37+
-projects $(Build.SourcesDirectory)/eng/empty.proj
38+
/p:AssetManifestFileName=aspnetcore-${{ parameters.inputName }}-signed.xml
39+
/p:DotNetSignType=$(_SignType)
40+
$(_BuildArgs)
41+
$(_PublishArgs)
42+
displayName: Sign and publish packages
2943
artifacts:
44+
- name: CodeSign_Xplat_${{ parameters.inputName }}_Logs
45+
path: artifacts/log/
46+
publishOnError: true
3047
- name: ${{ parameters.inputName }}_Packages_Signed
31-
path: $(Build.StagingDirectory)\deps\${{ parameters.inputName }}_Packages\
48+
path: artifacts/packages/

‎.azure/pipelines/jobs/default-build.yml

+158-191
Large diffs are not rendered by default.

‎Directory.Build.props

+10-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject>
2222
<IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject>
2323
<IsShipping Condition="'$(IsSampleProject)' == 'true' or '$(IsTestAssetProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsUnitTestProject)' == 'true'">false</IsShipping>
24+
25+
<!--
26+
Following logic mimics core-setup approach as well as
27+
https://github.com/dotnet/arcade/blob/694d59f090b743f894779d04a7ffe11cbaf352e7/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj#L30-L31
28+
$(DotNetFinalVersionKind) is set globally when doing final aka stable builds. Arcade infrastructure should pick
29+
up $(IsStableBuild) automatically; property is also used to control prerelease branding.
30+
-->
31+
<IsStableBuild>false</IsStableBuild>
32+
<IsStableBuild Condition="'$(DotNetFinalVersionKind)' == 'release'">true</IsStableBuild>
2433
</PropertyGroup>
2534

2635
<Import Project="eng\FlakyTests.BeforeArcade.props" />
@@ -119,7 +128,7 @@
119128
<BuildProjectReferences Condition=" '$(NoBuild)' == 'true' ">false</BuildProjectReferences>
120129
</PropertyGroup>
121130

122-
<!-- Artifacts layout -->
131+
<!-- Artifacts layout. Keep these values consistent with items defined in eng/Publishing.props. -->
123132
<PropertyGroup>
124133
<InstallersOutputPath>$(ArtifactsDir)installers\$(Configuration)\</InstallersOutputPath>
125134
<SymbolsOutputPath>$(ArtifactsDir)symbols\$(Configuration)\</SymbolsOutputPath>

‎Directory.Build.targets

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030

3131
<PropertyGroup Label="Versioning settings">
3232
<!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" -->
33-
<BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(VersionSuffix)</BrandingVersionSuffix>
33+
<BrandingVersionSuffix />
34+
<BrandingVersionSuffix Condition="$(IncludePreReleaseLabelInPackageVersion)">$(PreReleaseBrandingLabel) Build $(VersionSuffix)</BrandingVersionSuffix>
3435
<PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
3536
<PackageBrandingVersion Condition=" '$(VersionSuffix)' != '' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>
3637

‎build.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ if [ "$build_deps" = false ]; then
221221
msbuild_args[${#msbuild_args[*]}]="-p:BuildProjectReferences=false"
222222
fi
223223

224-
if [ "$build_managed" = true ] || (["$build_all" = true ] && [ "$build_managed" != false ]); then
224+
if [ "$build_managed" = true ] || ([ "$build_all" = true ] && [ "$build_managed" != false ]); then
225225
if [ -z "$build_nodejs" ]; then
226226
if [ -x "$(command -v node)" ]; then
227227
__warn "Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected on PATH."
@@ -266,6 +266,10 @@ if [ -z "$configuration" ]; then
266266
fi
267267
msbuild_args[${#msbuild_args[*]}]="-p:Configuration=$configuration"
268268

269+
# Set verbosity
270+
echo "Setting msbuild verbosity to $verbosity"
271+
msbuild_args[${#msbuild_args[*]}]="-verbosity:$verbosity"
272+
269273
# Initialize global variables need to be set before the import of Arcade is imported
270274
restore=$run_restore
271275

‎dockerbuild.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ docker build "$(dirname "$dockerfile")" \
124124
--build-arg "USER=$(whoami)" \
125125
--build-arg "USER_ID=$(id -u)" \
126126
--build-arg "GROUP_ID=$(id -g)" \
127+
--build-arg "WORKDIR=$DIR" \
127128
--tag $tagname \
128129
-f "$dockerfile"
129130

@@ -138,7 +139,7 @@ docker run \
138139
-e BUILD_SOURCEBRANCH \
139140
-e DOTNET_CLI_TELEMETRY_OPTOUT \
140141
-e Configuration \
141-
-v "$DIR:/code/build" \
142+
-v "$DIR:$DIR" \
142143
${docker_args[@]+"${docker_args[@]}"} \
143144
$tagname \
144145
./build.sh \

‎docs/Artifacts.md

+24-10
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,36 @@ Artifacts
33

44
Building this repo produces build artifacts in the directory structure described below. Build outputs are organized into logical groups based on artifact type and the intended usage of the artifacts.
55

6+
See also https://github.com/dotnet/arcade/blob/master/Documentation/ArcadeSdk.md This repo follows _most_ of the conventions described there.
7+
68
```
79
artifacts/
810
installers/
911
$(Configuration)/
10-
*.msi = Windows installers
11-
*.deb, *.rpm = Linux installers
12-
*.zip, *.tar.gz = archives versions of installers
12+
*.msi = Windows installers
13+
*.deb, *.rpm = Linux installers
14+
*.zip, *.tar.gz = archives versions of installers
15+
log/
16+
runningProcesses*.txt = Process list from just before build completed
17+
runningProcesses*.bak = Process list from two minutes before runningProcesses*.txt files were written
18+
*.binlog = Binary logs for a few build phases e.g. site extension build
19+
**/
20+
*.log = Log files for test runs and individual tests
21+
$(Configuration)/
22+
*.binlog = Binary logs for most build phases
1323
packages/
1424
$(Configuration)/
15-
Shipping/ = Packages which are intended for use by customers. These, along with installers, represent the 'product'.
16-
*.nupkg = NuGet packages which ship to nuget.org
17-
*.jar = Java packages which ship to Maven Central and others
18-
*.tgz = NPM packages which ship to npmjs.org
19-
NonShipping/
20-
*.nupkg = NuGet packages for internal use only. Used to hand off bits to Microsoft partner teams. Not intended for use by customers.
25+
Shipping/ = Packages which are intended for use by customers. These, along with installers, represent the 'product'.
26+
*.nupkg = NuGet packages which ship to nuget.org
27+
*.jar = Java packages which ship to Maven Central and others
28+
*.tgz = NPM packages which ship to npmjs.org
29+
NonShipping/
30+
*.nupkg = NuGet packages for internal use only. Used to hand off bits to Microsoft partner teams. Not intended for use by customers.
31+
symbols/
32+
$(Configuration)/
33+
$(TargetFramework)/
34+
*.pdb = Loose symbol files for symbol server publication. Special cases where *.symbols.nupkg packaging is cumbersome.
2135
VSSetup/
2236
$(Configuration)/
23-
*.vsix = Visual Studio extensions
37+
*.vsix = Visual Studio extensions. None currently exist.
2438
```

‎eng/AfterSolutionBuild.targets

-11
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,4 @@
1717
SharedFrameworkTargetFramework="netcoreapp$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)" />
1818
</Target>
1919

20-
<Target Name="GenerateBuildAssetManifest" AfterTargets="Pack" Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(DotNetBuildFromSource)' != 'true'">
21-
<!-- Generate build manifests. These manifests are used by Maestro and the Build Asset Registry to flow dependencies to other repos. -->
22-
<MSBuild Projects="$(MSBuildThisFileDirectory)tools\Maestro\Maestro.csproj"
23-
Targets="Restore"
24-
Properties="__DummyTarget=Restore" />
25-
26-
<MSBuild Projects="$(MSBuildThisFileDirectory)tools\Maestro\Maestro.csproj"
27-
Targets="GenerateBuildAssetManifest"
28-
Properties="__DummyTarget=GenerateBuildAssetManifest" />
29-
</Target>
30-
3120
</Project>

‎eng/Publishing.props

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<Project>
2+
<PropertyGroup Condition=" HasTrailingSlash('$(ArtifactsDir)') ">
3+
<!-- The one use of ArtifactsDir in Publish.proj adds an additional slash, confusing itself. -->
4+
<ArtifactsDir>$(ArtifactsDir.Substring(0, $([MSBuild]::Subtract($(ArtifactsDir.Length), 1))))</ArtifactsDir>
5+
6+
<PublishDependsOnTargets>$(PublishDependsOnTargets);_PublishInstallers</PublishDependsOnTargets>
7+
8+
<_UploadPathRoot>aspnetcore</_UploadPathRoot>
9+
</PropertyGroup>
10+
11+
<!-- $(InstallersOutputPath) and $(SymbolsOutputPath) are not defined. Root Directory.Build.props is not imported. -->
12+
<ItemGroup>
13+
<!-- Include our "loose" PDBs when publishing symbols. -->
14+
<FilesToPublishToSymbolServer Include="$(ArtifactsDir)\symbols\**\*.pdb" />
15+
16+
<!-- Prepare for _PublishInstallers target. -->
17+
<_InstallersToPublish Remove="@(_InstallersToPublish)" />
18+
<_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.jar" UploadPathSegment="jar" />
19+
<_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.pom" UploadPathSegment="jar" />
20+
<_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.tgz" UploadPathSegment="npm" />
21+
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.deb" UploadPathSegment="Runtime" />
22+
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.exe" UploadPathSegment="Runtime" />
23+
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.msi" UploadPathSegment="Runtime" />
24+
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.rpm" UploadPathSegment="Runtime" />
25+
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.tar.gz" UploadPathSegment="Runtime" />
26+
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.version" UploadPathSegment="Runtime"
27+
Condition=" '$(PublishInstallerBaseVersion)' == 'true' " />
28+
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.wixlib" UploadPathSegment="Runtime" />
29+
<_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.zip" UploadPathSegment="Runtime" />
30+
</ItemGroup>
31+
32+
<Target Name="_PublishInstallers">
33+
<!-- This target is defined in eng/targets/Packaging.targets and included in every C# and F# project. -->
34+
<MSBuild Projects="$(RepoRoot)src\Mvc\Mvc\src\Microsoft.AspNetCore.Mvc.csproj"
35+
Targets="_GetPackageVersionInfo"
36+
SkipNonexistentProjects="false">
37+
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" />
38+
</MSBuild>
39+
40+
<PropertyGroup>
41+
<_PackageVersion>@(_ResolvedPackageVersionInfo->'%(PackageVersion)')</_PackageVersion>
42+
</PropertyGroup>
43+
44+
<ItemGroup>
45+
<!-- Do not push .nupkg files from Linux and macOS builds. They'll be packed up separately and signed on Windows. -->
46+
<ItemsToPushToBlobFeed Remove="@(ItemsToPushToBlobFeed)" Condition="'$(OS)' != 'Windows_NT'" />
47+
48+
<ItemsToPushToBlobFeed Include="@(_InstallersToPublish)">
49+
<IsShipping>false</IsShipping>
50+
<ManifestArtifactData>NonShipping=true;ShipInstaller=dotnetcli</ManifestArtifactData>
51+
<PublishFlatContainer>true</PublishFlatContainer>
52+
<RelativeBlobPath>$(_UploadPathRoot)/%(_InstallersToPublish.UploadPathSegment)/$(_PackageVersion)/%(Filename)%(Extension)</RelativeBlobPath>
53+
</ItemsToPushToBlobFeed>
54+
</ItemGroup>
55+
</Target>
56+
</Project>

‎eng/SignCheckExclusionsFile.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apphost.exe;; Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it.
2+
.js;; We do not sign JavaScript files.
3+
.binlog;; MSBuild binary logs are not signed though they are sometimes placed where validation thinks they should be.
4+
WixUIWixca|WixDepCA;; We do not sign WiX content in our installers.

‎eng/Signing.props

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
-->
2222
<FileExtensionSignInfo Include=".jar" CertificateName="MicrosoftJARSHA2" />
2323
<FileExtensionSignInfo Include=".ps1;.psd1;.psm1;.psc1" CertificateName="Microsoft400" />
24+
<FileExtensionSignInfo Include=".dll;.exe" CertificateName="Microsoft400" />
2425
<FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
2526
<FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
2627
<FileExtensionSignInfo Include=".zip" CertificateName="None" />

‎eng/Version.Details.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -412,15 +412,15 @@
412412
<Uri>https://github.com/aspnet/Extensions</Uri>
413413
<Sha>73c259904d5db01bbeede15df2a72d1b94cb3306</Sha>
414414
</Dependency>
415-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19456.10">
415+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19458.2">
416416
<Uri>https://github.com/dotnet/arcade</Uri>
417417
<Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha>
418418
</Dependency>
419-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19456.10">
419+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19458.2">
420420
<Uri>https://github.com/dotnet/arcade</Uri>
421421
<Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha>
422422
</Dependency>
423-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19456.10">
423+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19458.2">
424424
<Uri>https://github.com/dotnet/arcade</Uri>
425425
<Sha>2d393243ba4a0c95c2c18aa266df6e0f43ffe22d</Sha>
426426
</Dependency>

‎eng/Versions.props

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
1111
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
1212
<PreReleasePreviewNumber>2</PreReleasePreviewNumber>
13-
<PreReleaseVersionLabel>rc$(PreReleasePreviewNumber)</PreReleaseVersionLabel>
14-
<PreReleaseBrandingLabel>Release Candidate $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
13+
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
14+
<IncludePreReleaseLabelInPackageVersion Condition=" '$(IsStableBuild)' == 'true' ">false</IncludePreReleaseLabelInPackageVersion>
15+
<PreReleaseVersionLabel Condition="$(IncludePreReleaseLabelInPackageVersion)">rc$(PreReleasePreviewNumber)</PreReleaseVersionLabel>
16+
<PreReleaseBrandingLabel Condition="$(IncludePreReleaseLabelInPackageVersion)">Release Candidate $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
1517
<!-- Blazor Client packages will not RTM with 3.0 -->
1618
<BlazorClientPreReleasePreviewNumber>9</BlazorClientPreReleasePreviewNumber>
1719
<BlazorClientPreReleaseVersionLabel>preview$(BlazorClientPreReleasePreviewNumber)</BlazorClientPreReleaseVersionLabel>
@@ -53,7 +55,7 @@
5355
-->
5456
<PropertyGroup Label="Automated">
5557
<!-- Packages from dotnet/arcade -->
56-
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19456.10</MicrosoftDotNetGenAPIPackageVersion>
58+
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19458.2</MicrosoftDotNetGenAPIPackageVersion>
5759
<!-- Packages from dotnet/roslyn -->
5860
<MicrosoftNetCompilersToolsetPackageVersion>3.3.1-beta3-19454-05</MicrosoftNetCompilersToolsetPackageVersion>
5961
<!-- Packages from dotnet/core-setup -->

‎eng/docker/alpine.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM microsoft/dotnet:2.1.0-preview1-runtime-deps-alpine
22
ARG USER
33
ARG USER_ID
44
ARG GROUP_ID
5+
ARG WORKDIR
56

6-
WORKDIR /code/build
7+
WORKDIR ${WORKDIR}
78
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
89
ENV HOME "/home/$USER"
910

‎eng/docker/bionic.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ FROM microsoft/dotnet:2.1-runtime-deps-bionic
33
ARG USER
44
ARG USER_ID
55
ARG GROUP_ID
6+
ARG WORKDIR
67

7-
WORKDIR /code/build
8+
WORKDIR ${WORKDIR}
89
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
910
ENV HOME "/home/$USER"
1011

‎eng/docker/rhel.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ FROM mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-e1b4a89-201753110
55
ARG USER
66
ARG USER_ID
77
ARG GROUP_ID
8+
ARG WORKDIR
89

9-
WORKDIR /code/build
10+
WORKDIR ${WORKDIR}
1011

1112
RUN useradd -m ${USER} --uid ${USER_ID} -g root
1213
RUN echo '${USER} ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

‎eng/docker/ubuntu-alpine37.Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine
22
ARG USER
33
ARG USER_ID
44
ARG GROUP_ID
5+
ARG WORKDIR
56

6-
WORKDIR /code/build
7+
WORKDIR ${WORKDIR}
78
RUN mkdir -p "/home/$USER" && chown "${USER_ID}:${GROUP_ID}" "/home/$USER"
89
ENV HOME "/home/$USER"
910

‎eng/empty.proj

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!-- eng\common\build.ps1 fails without a project to build, so we give it this empty project to satisfy its desires -->
2+
<Project>
3+
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4+
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
5+
</Project>

‎eng/tools/Maestro/Maestro.csproj

-38
This file was deleted.

‎eng/tools/XplatPackageSigner/XplatPackageSigner.proj

-38
This file was deleted.

‎eng/tools/XplatPackageSigner/sign-packages.cmd

-15
This file was deleted.

‎global.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"msbuild-sdks": {
2626
"Yarn.MSBuild": "1.15.2",
27-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19456.10",
28-
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19456.10"
27+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19458.2",
28+
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19458.2"
2929
}
3030
}

‎src/Components/Blazor/Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<PropertyGroup>
55
<!-- Override prerelease label and use preview 9, even in the final build -->
66
<PreReleaseVersionLabel>$(BlazorClientPreReleaseVersionLabel)</PreReleaseVersionLabel>
7-
<DotNetFinalVersionKind></DotNetFinalVersionKind>
7+
<DotNetFinalVersionKind />
88
</PropertyGroup>
99
</Project>

‎src/Hosting/Server.IntegrationTesting/src/Common/DotNetCommands.cs

+21-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ public static class DotNetCommands
1616
// Compare to https://github.com/aspnet/BuildTools/blob/314c98e4533217a841ff9767bb38e144eb6c93e4/tools/KoreBuild.Console/Commands/CommandContext.cs#L76
1717
public static string GetDotNetHome()
1818
{
19+
// runtest.* scripts throughout the repo define $env:DOTNET_HOME
1920
var dotnetHome = Environment.GetEnvironmentVariable("DOTNET_HOME");
21+
// /activate.* and runtest.* scripts define $env:DOTNET_ROOT and (for /activate.*) $env:{DOTNET_ROOT(x86)}
2022
var dotnetRoot = Environment.GetEnvironmentVariable("DOTNET_ROOT");
23+
// /eng/common/tools.* scripts define $env:DOTNET_INSTALL_DIR
24+
var dotnetInstallDir = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR");
25+
2126
var userProfile = Environment.GetEnvironmentVariable("USERPROFILE");
2227
var home = Environment.GetEnvironmentVariable("HOME");
2328

@@ -28,8 +33,19 @@ public static string GetDotNetHome()
2833
}
2934
else if (!string.IsNullOrEmpty(dotnetRoot))
3035
{
31-
// DOTNET_ROOT has x64 appended to the path, which we append again in GetDotNetInstallDir
32-
result = dotnetRoot.Substring(0, dotnetRoot.Length - 3);
36+
if (dotnetRoot.EndsWith("x64"))
37+
{
38+
// DOTNET_ROOT has x64 appended to the path, which we append again in GetDotNetInstallDir
39+
result = dotnetRoot[0..^3];
40+
}
41+
else
42+
{
43+
result = dotnetRoot;
44+
}
45+
}
46+
else if (!string.IsNullOrEmpty(dotnetInstallDir))
47+
{
48+
result = dotnetInstallDir;
3349
}
3450
else if (!string.IsNullOrEmpty(userProfile))
3551
{
@@ -46,9 +62,10 @@ public static string GetDotNetHome()
4662
public static string GetDotNetInstallDir(RuntimeArchitecture arch)
4763
{
4864
var dotnetDir = DotNetHome;
49-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
65+
var archSpecificDir = Path.Combine(dotnetDir, arch.ToString());
66+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Directory.Exists(archSpecificDir))
5067
{
51-
dotnetDir = Path.Combine(dotnetDir, arch.ToString());
68+
dotnetDir = archSpecificDir;
5269
}
5370

5471
return dotnetDir;

0 commit comments

Comments
 (0)
Please sign in to comment.