forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate NCL stress testing infrastructure (dotnet#700)
- Loading branch information
1 parent
9a54db9
commit 3951076
Showing
18 changed files
with
410 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Docker Build Infrastructure | ||
|
||
Provides reusable docker build infrastructure for the dotnet/runtime repo. | ||
|
||
## libraries-sdk Dockerfiles | ||
|
||
The `libraries-sdk` Dockerfiles can be used to build dotnet sdk docker images | ||
that contain the current libraries built from source. | ||
These images can be used to build dockerized dotnet services that target the current libraries. | ||
Currently, debian and windows nanoserver sdk's are supported. | ||
|
||
### Building the images | ||
|
||
To build the linux image locally | ||
|
||
```powershell | ||
PS> .\build-docker-sdk.ps1 -t dotnet-linux-sdk-current | ||
``` | ||
|
||
and for Windows: | ||
|
||
```powershell | ||
PS> .\build-socker-sdk.ps1 -w -t dotnet-nanoserver-sdk-current | ||
``` | ||
|
||
To use Debug builds: | ||
|
||
```powershell | ||
PS> .\build-docker-sdk.ps1 -c Debug -t dotnet-sdk-current | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env pwsh | ||
# Builds libraries and produces a dotnet sdk docker image | ||
# that contains the current bits in its shared framework folder. | ||
|
||
[CmdletBinding(PositionalBinding=$false)] | ||
Param( | ||
[string][Alias('t')]$imageName = "dotnet-sdk-libs-current", | ||
[string][Alias('c')]$configuration = "Release", | ||
[switch][Alias('w')]$buildWindowsContainers | ||
) | ||
|
||
$REPO_ROOT_DIR=$(git -C "$PSScriptRoot" rev-parse --show-toplevel) | ||
|
||
if ($buildWindowsContainers) | ||
{ | ||
# Due to size concerns, we don't currently do docker builds on windows. | ||
# Build on the host machine, then simply copy artifacts to the target docker image. | ||
# This should result in significantly lower build times, for now. | ||
& "$REPO_ROOT_DIR/libraries.cmd" -ci -c $configuration | ||
|
||
# Dockerize the build artifacts | ||
docker build --tag $imageName ` | ||
--build-arg CONFIGURATION=$configuration ` | ||
--build-arg TESTHOST_LOCATION=. ` | ||
--file "$PSScriptRoot/libraries-sdk.windows.Dockerfile" ` | ||
"$REPO_ROOT_DIR/artifacts/bin/testhost" | ||
} | ||
else | ||
{ | ||
# Docker build libraries and copy to dotnet sdk image | ||
docker build --tag $imageName ` | ||
--build-arg CONFIGURATION=$configuration ` | ||
--file "$PSScriptRoot/libraries-sdk.linux.Dockerfile" ` | ||
$REPO_ROOT_DIR | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...ests/HttpStress/corefx.windows.Dockerfile → eng/docker/libraries-sdk.windows.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
trigger: none | ||
|
||
pr: | ||
branches: | ||
include: | ||
- "*" | ||
|
||
schedules: | ||
- cron: "0 13 * * *" # 1PM UTC => 5 AM PST | ||
displayName: HttpStress nightly run | ||
branches: | ||
include: | ||
- master | ||
|
||
variables: | ||
- template: ../variables.yml | ||
- name: dockerfilesFolder | ||
value: $(Build.SourcesDirectory)/eng/docker | ||
- name: httpStressProject | ||
value: $(sourcesRoot)/System.Net.Http/tests/StressTests/HttpStress | ||
- name: sdkBaseImage | ||
value: dotnet-sdk-libraries-current | ||
|
||
|
||
jobs: | ||
|
||
- job: linux | ||
displayName: Docker Linux | ||
pool: | ||
name: Hosted Ubuntu 1604 | ||
|
||
steps: | ||
- checkout: self | ||
clean: true | ||
fetchDepth: 5 | ||
|
||
- bash: | | ||
$(dockerfilesFolder)/build-docker-sdk.ps1 -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) | ||
displayName: Build Libraries | ||
- bash: | | ||
$(httpStressProject)/run-docker-compose.ps1 -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) | ||
displayName: Build HttpStress | ||
- bash: | | ||
cd '$(httpStressProject)' | ||
docker-compose up --abort-on-container-exit --no-color | ||
displayName: Run HttpStress | ||
- job: windows | ||
displayName: Docker Nano Server | ||
pool: | ||
vmImage: 'windows-latest' | ||
|
||
steps: | ||
- checkout: self | ||
clean: true | ||
fetchDepth: 1 | ||
lfs: false | ||
|
||
- pwsh: | | ||
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) | ||
displayName: Build Libraries | ||
- pwsh: | | ||
$(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) | ||
displayName: Build HttpStress | ||
- pwsh: | | ||
cd '$(httpStressProject)' | ||
docker-compose up --abort-on-container-exit --no-color | ||
displayName: Run HttpStress |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.