Closed natemcmaster closed 7 years ago
I will set up a short mtg to discuss.
Notes for our meeting today
build.ps1
download https://github.com/aspnet/KoreBuild/archive/dev.zip$repo/.build
.build/KoreBuild.ps1
.build/KoreBuild.ps1
executes
.build/dotnet/dotnet-install.ps1
to restore runtimes and SDKsdotnet msbuild /t:Restore /p:PreflightRestore=true
to download task packages and reference assembliesdotnet msbuild KoreBuild.proj
which runs the main lifecycle (build/test/verify)Note: replace .ps1 with .sh for Linux builds
KoreBuild "floats" in a way. Because its download URL is per-branch, it always gets the latest source.
https://github.com/aspnet/KoreBuild/archive/dev.zip https://github.com/aspnet/KoreBuild/archive/release/2.0.0-preview2.zip
KoreBuild floats PackageReference
versions within it's PreflightRestore
step.
<PackageReference Include="NuGetPackageVerifier" Version="2.0.0-*" />
<PackageReference Include="Internal.AspNetCore.BuildTools.Tasks" Version="1.0.0-*" />
AutoUpdate is not possible
When extracting the GitHub source archive, the bootstrapper does not have access to the "version" (i.e. commit hash) of the code it is using. This means we cannot reliably auto-update the $repo/.build
folder.
Version coherence PackageReferences within KoreBuild's code are not guaranteed to match KoreBuild's code, and may change when new packages become available. This may mean long-running builds can end up with newer packages being installed half-way through a build.
Pinning is manual and requires source changes
Pinning KoreBuild to exact version requires source code changes. The bootstrapper must change its download url in build.ps1
, and korebuild scripts in this repo must pin their PackageReference
versions.
Idea is approved.
We should look at some of the exact details, such as whether to use a MyGet feed, blob storage, etc.
Some exact details:
Azure storage blob
I'm currently thinking a blob store will be easier to work with. If we use MyGet, we would need a NuGet client to acquire KoreBuild. That's easy on Windows with NuGet.exe, but running NuGet.exe on Linux would require Mono. AFAIK the only alternative is to write the curl + JSON code manually in bash to immitate what NuGet.exe does. Eww.
Move KoreBuild code to aspnet/BuildTools. This will make it easier to ensure the console tools KoreBuild bundles use a .NET Core runtime that aligns with what KoreBuild will install.
Incrementally update repos. As long as build.ps1/sh still builds the default lifecycle, we don't have to upgrade all at once.
Azure storage blob
Really agree here. I tested out MyGet and found this same issue. Azure Blobs are low-impact, low-cost and easy to use. Blobs support Etags automatically so we're easily able to use our auto-update mechanism.
An additional detail:
PR to update Universe to use the compiled KoreBuild - https://github.com/aspnet/Universe/pull/521
Goals:
Implementation ideas:
cc @anurse @pakrym @pranavkm