Add devcontainer configurations for source build (#14084)

* Add devcontainer configurations for source build
This commit is contained in:
Logan Bussell 2022-07-12 10:33:54 -07:00 committed by GitHub
parent c27dc5d1e4
commit 98d5be7aaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/dotnet
{
"name": "Source-Build w/ Built Tarball",
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2",
// A completely built .NET source-tarball is >64 GB
"hostRequirements": {
"storage": "128gb"
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp",
"eamodio.gitlens"
]
}
},
// Use 'onCreateCommand' to run pre-build commands inside the codespace.
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/source-build-scripts/buildTarball.sh"
}

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
./.devcontainer/source-build-scripts/createTarball.sh
cd $(realpath ..)/dotnet-source/
./prep.sh
./build.sh --online --clean-while-building || true

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Always return exit code 0 so that we can use the codespaces prebuild to diagnose build errors.
./build.sh /p:ArcadeBuildTarball=true /p:TarballDir=$(realpath ..)/dotnet-source/ /p:PreserveTarballGitFolders=true || true
# Save the commit hash of the currently built repo, so developers know which version was built
git rev-parse HEAD > ./artifacts/prebuild.sha

View file

@ -0,0 +1,20 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/dotnet
{
"name": "Source-Build w/ Tarball",
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2",
// A completely built .NET source tarball is >64 GB
"hostRequirements": {
"storage": "128gb"
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csharp",
"eamodio.gitlens"
]
}
},
// Use 'onCreateCommand' to run pre-build commands inside the codespace.
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/createTarball.sh"
}

View file

@ -0,0 +1,5 @@
// Use this devcontainer if you don't need the full context of a source-build tarball
{
"name": "Source-Build",
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2"
}