Skip to content

Commit

Permalink
Remove tarball verbiage from source-build infrastructure (#15217)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSimons authored Jan 10, 2023
1 parent eaada64 commit 7c32241
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/SourceBuild/content/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Default",
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36",
"hostRequirements": {
// A completely built .NET source-tarball is >64 GB
// A completely source built .NET is >64 GB with all the repos/artifacts
"storage": "128gb"
},
"customizations": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Pre-built .NET SDK",
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36",
"hostRequirements": {
// A completely built .NET source-tarball is >64 GB
// A completely source built .NET is >64 GB with all the repos/artifacts
"storage": "128gb"
},
"customizations": {
Expand Down
11 changes: 3 additions & 8 deletions src/SourceBuild/content/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,14 @@ fi
if [ -f "${packagesArchiveDir}archiveArtifacts.txt" ]; then
ARCHIVE_ERROR=0
if [ ! -d "$SCRIPT_ROOT/.dotnet" ] && [ "$CUSTOM_SDK_DIR" == "" ]; then
echo "ERROR: SDK not found at $SCRIPT_ROOT/.dotnet"
echo "ERROR: SDK not found at '$SCRIPT_ROOT/.dotnet'. Either run prep.sh to acquire one or specify one via the --with-sdk parameter."
ARCHIVE_ERROR=1
fi
if [ ! -f ${packagesArchiveDir}Private.SourceBuilt.Artifacts*.tar.gz ] && [ "$CUSTOM_PACKAGES_DIR" == "" ]; then
echo "ERROR: Private.SourceBuilt.Artifacts artifact not found at $packagesArchiveDir - Either run prep.sh or pass --with-packages parameter"
echo "ERROR: Private.SourceBuilt.Artifacts artifact not found at '$packagesArchiveDir'. Either run prep.sh to acquire it or specify one via the --with-packages parameter."
ARCHIVE_ERROR=1
fi
if [ $ARCHIVE_ERROR == 1 ]; then
echo ""
echo " Errors detected in tarball. To prep the tarball, run prep.sh while online to install an SDK"
echo " and Private.SourceBuilt.Artifacts tarball. After prepping the tarball, the tarball can be"
echo " built offline. As an alternative to prepping the tarball, these assets can be provided using"
echo " the --with-sdk and --with-packages parameters"
exit 1
fi
fi
Expand Down Expand Up @@ -161,7 +156,7 @@ if [[ $arcadeSdkLine =~ $versionPattern ]]; then
export ARCADE_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}

# Ensure that by default, the bootstrap version of the Arcade SDK is used. Source-build infra
# projects use bootstrap Arcade SDK, and would fail to find it in the tarball build. The repo
# projects use bootstrap Arcade SDK, and would fail to find it in the build. The repo
# projects overwrite this so that they use the source-built Arcade SDK instad.
export SOURCE_BUILT_SDK_ID_ARCADE=Microsoft.DotNet.Arcade.Sdk
export SOURCE_BUILT_SDK_VERSION_ARCADE=$ARCADE_BOOTSTRAP_VERSION
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/content/eng/tools/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
Do not import the Arcade SDK for the local tooling projects. This lets us
build them with just the .NET Core SDK, simplifying tarball build.
build them with just the .NET Core SDK, simplifying the build.
-->
<PropertyGroup>
<SkipArcadeSdkImport>true</SkipArcadeSdkImport>
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/content/prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)"
usage() {
echo "usage: $0 [options]"
echo ""
echo " Prepares a tarball to be built by downloading Private.SourceBuilt.Artifacts.*.tar.gz and"
echo " Prepares the environment to be built by downloading Private.SourceBuilt.Artifacts.*.tar.gz and"
echo " installing the version of dotnet referenced in global.json"
echo "options:"
echo " --bootstrap Build a bootstrap version of previously source-built packages archive."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<!-- A human-readable description of what's building and why. -->
<PropertyGroup>
<ProjectBuildReason>'$(RepositoryName) in tarball'</ProjectBuildReason>
<ProjectBuildReason>'$(RepositoryName)'</ProjectBuildReason>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/SourceBuild/content/repo-projects/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
NewText="_InitializeBuildToolFramework=&quot;%24{_OverrideArcadeInitializeBuildToolFramework-netcoreapp3.1}&quot;" />

<!-- Temporary workaround for when the ci option is specified, non-zero exit are swallowed which prevents builds from failing within
the tarball build preocess. https://github.com/dotnet/source-build/issues/2307 -->
the build process. https://github.com/dotnet/source-build/issues/2307 -->
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
OldText="ExitWithExitCode 0"
NewText="ExitWithExitCode $exit_code" />
Expand Down Expand Up @@ -702,7 +702,7 @@
<AllRestoredPackageFiles Include="$(LocalNuGetPackagesRoot)**/*.nupkg" />
<AllRestoredPackageFiles Include="$(PackagesDir)**/*.nupkg" />

<!-- Only contains packages when building a tarball. -->
<!-- Only contains packages when building. -->
<TarballPrebuiltPackageFiles Include="$(PrebuiltPackagesPath)*.nupkg" />

<SourceBuiltPackageFiles Include="$(SourceBuiltBlobFeedDir)**/*.nupkg" />
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/content/repo-projects/known-good.proj
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
<RepositoryReference Include="aspnetcore" />
<RepositoryReference Include="deployment-tools" />
<RepositoryReference Include="format" />
<RepositoryReference Include="nuget-client" />
<RepositoryReference Include="templating" />
<RepositoryReference Include="nuget-client" />
<RepositoryReference Include="test-templates" />

<!-- Tier 5 -->
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/content/repo-projects/msbuild.proj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
The CentralPackageVersions SDK isn't actually source-built. We get it as a text-only prebuilt,
but the NuGet resolver seems flaky so we're using our resolver instead. We only have access to
the nupkg ahead of time when building a tarball, so only enable this workaround then.
the nupkg ahead of time when building, so only enable this workaround then.
-->
<ItemGroup>
<CentralPackageVersionsSdkOverride Include="Microsoft.Build.CentralPackageVersions" Group="CENTRAL_PACKAGE_VERSIONS" />
Expand Down
3 changes: 1 addition & 2 deletions src/SourceBuild/content/repo-projects/templating.proj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
</PropertyGroup>

<ItemGroup>
<!-- TODO: Renable once nuget-client is building in tarball -->
<!-- <RepositoryReference Include="nuget-client" /> -->
<RepositoryReference Include="nuget-client" />
<RepositoryReference Include="source-build-externals" />
</ItemGroup>

Expand Down

0 comments on commit 7c32241

Please sign in to comment.