Add devcontainer configurations for source build (#14084)
* Add devcontainer configurations for source build
This commit is contained in:
parent
c27dc5d1e4
commit
98d5be7aaa
5 changed files with 63 additions and 0 deletions
23
.devcontainer/devcontainer.json
Normal file
23
.devcontainer/devcontainer.json
Normal 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"
|
||||||
|
}
|
8
.devcontainer/source-build-scripts/buildTarball.sh
Executable file
8
.devcontainer/source-build-scripts/buildTarball.sh
Executable 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
|
7
.devcontainer/source-build-scripts/createTarball.sh
Executable file
7
.devcontainer/source-build-scripts/createTarball.sh
Executable 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
|
20
.devcontainer/source-build-tarball/devcontainer.json
Normal file
20
.devcontainer/source-build-tarball/devcontainer.json
Normal 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"
|
||||||
|
}
|
5
.devcontainer/source-build/devcontainer.json
Normal file
5
.devcontainer/source-build/devcontainer.json
Normal 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"
|
||||||
|
}
|
Loading…
Reference in a new issue