Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c2c69af
Set up CI with Start Right
Dec 18, 2024
8f235e7
Update deploy-networking-echo-test-servers.yml for Azure Pipelines
rzikm Jan 6, 2025
6b73163
Update deploy-networking-echo-test-servers.yml for Azure Pipelines
rzikm Jan 6, 2025
da6f949
Update deploy-networking-echo-test-servers.yml for Azure Pipelines
rzikm Jan 6, 2025
89c695e
Update .NET version in pipeline
rzikm Jan 6, 2025
9e72d21
allow preview versions of .NET
rzikm Jan 6, 2025
d6ada52
fix
rzikm Jan 6, 2025
5a91612
Update deploy-networking-echo-test-servers.yml for Azure Pipelines
rzikm Jan 6, 2025
ede1b2b
Use multi level lookup
rzikm Jan 7, 2025
bae3096
Manual invocation of dotnet build.
rzikm Jan 7, 2025
7847c66
use .NET 8
rzikm Jan 7, 2025
e9785cf
script task instead of powershell
rzikm Jan 7, 2025
6b4acf6
Specify working directory during build
rzikm Jan 7, 2025
fb75eb3
remove global.json
rzikm Jan 7, 2025
1035b70
fix
rzikm Jan 7, 2025
6aa6fc2
Add versions reference
rzikm Jan 7, 2025
642fed1
Update to released OpenTelemetry packages
rzikm Jan 8, 2025
d5bdc8f
Turn on GenevaTelemetry in the pipeline build
rzikm Jan 8, 2025
163a478
Add swagger file
rzikm Jan 9, 2025
337c575
Move yml file to eng/pipelines/libraries
rzikm Jan 9, 2025
926d713
Fix pipeline
rzikm Jan 9, 2025
6c119e1
Deploy to http2 as well
rzikm Jan 14, 2025
fb5de3c
Update eng/pipelines/libraries/deploy-networking-echo-test-servers.yml
rzikm Jan 14, 2025
f7221ea
Remove duplicate server URL from swagger file
rzikm Jan 14, 2025
ebc38d0
Update eng/pipelines/libraries/deploy-networking-echo-test-servers.yml
rzikm Jan 15, 2025
6d856fc
Add deploy instructions
rzikm Jan 20, 2025
5e71c95
Update eng/pipelines/libraries/deploy-networking-echo-test-servers.yml
rzikm Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions eng/pipelines/libraries/deploy-networking-echo-test-servers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# This pipeline deploys the test servers we are using to run (outerloop) Functional tests for various functionality in System.Net namespace.
# The pipeline deploys to staging slots, which are available at
# - corefx-net-http11-staging.azurewebsites.net
# - corefx-net-http2-staging.azurewebsites.net
#
# Usage instructions:
# 1) Start pipeline at https://dev.azure.com/dnceng/internal/_build?definitionId=1419 (
deploy-networking-echo-test-servers), pick the correct branch and start the build.
# 2) After pipeline succeeds, check your changes against the staging slots, two possible ways to do this are:
# - create a no-merge PR where you overwrite the default urls (e.g. https://github.com/dotnet/runtime/pull/111396)
# - test locally, either by same changes as in above PR, or by using the override environment variables
#
# DOTNET_TEST_HTTPHOST=http://corefx-net-http11-staging.azurewebsites.net
# DOTNET_TEST_SECUREHTTPHOST=https://corefx-net-http11-staging.azurewebsites.net
# DOTNET_TEST_WEBSOKETHOST=http://corefx-net-http11-staging.azurewebsites.net
# DOTNET_TEST_SECUREWEBSOKETHOST=http://corefx-net-http11-staging.azurewebsites.net
#
# DOTNET_TEST_HTTP2HOST=http://corefx-net-http2-staging.azurewebsites.net
# 3) If there are no issues, you can swap the staging slots with production slots via the Azure portal.
# Only the members of the .NET Networking team have access to the Azure Subscription which hosts the
# servers. Look for the "Deployment slots" section at corefx-net-http11 and corefx-net-http2 Web Apps

trigger: none

resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

variables:
- template: /eng/common/templates-official/variables/pool-providers.yml
- name: FrameworkVersion
value: 8.x
- name: TargetFramework
value: net8.0

extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
customBuildTags:
- 1ES.PT.ViaStartRight
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows

stages:
- stage: stage
displayName: Building in a VM
jobs:
- job: job
displayName: Build
steps:
- checkout: self

- task: UseDotNet@2
inputs:
packageType: "sdk"
version: $(FrameworkVersion)

- script: echo {} > ./global.json
displayName: Bypass repository global.json
workingDirectory: ./src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer

- script: dotnet publish -c Release /p:GenevaTelemetry=true /p:_TargetFrameworkForXHarness=$(TargetFramework)
workingDirectory: ./src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer
displayName: Run dotnet publish

- task: zip@0
displayName: Zip artifacts
inputs:
pathToZipFolder: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish\'
pathToZipFile: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip'

- task: AzureRmWebAppDeployment@4
displayName: Deploy to corefx-net-http11-staging
inputs:
ConnectionType: "AzureRM"
azureSubscription: .NET Libraries Network Testing
appType: "webApp"
WebAppName: "corefx-net-http11"
deployToSlotOrASE: true
ResourceGroupName: "Production-WestUS"
SlotName: "staging"
package: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip'

- task: AzureRmWebAppDeployment@4
displayName: Deploy to corefx-net-http2-staging
inputs:
ConnectionType: "AzureRM"
azureSubscription: .NET Libraries Network Testing
appType: "webApp"
WebAppName: "corefx-net-http2"
deployToSlotOrASE: true
ResourceGroupName: "Production-WestUS"
SlotName: "staging"
package: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip'
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
</PropertyGroup>

<Import Project="$([MSBuild]::NormalizePath($(RepositoryRoot), 'eng', 'testing', 'ForXHarness.Directory.Build.props'))" />
<Import Project="$([MSBuild]::NormalizePath($(RepositoryRoot), 'eng', 'Versions.props'))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public GenericHandler(RequestDelegate next)
public async Task Invoke(HttpContext context)
{
PathString path = context.Request.Path;
if (path.Equals(new PathString("/swagger.json")))
{
using (var stream = typeof(GenericHandler).Assembly.GetManifestResourceStream("NetCoreServer.swagger.json"))
{
context.Response.ContentType = "application/json";
await stream.CopyToAsync(context.Response.Body);
}
return;
}

if (path.Equals(new PathString("/deflate.ashx")))
{
await DeflateHandler.InvokeAsync(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@
</ItemGroup>

<ItemGroup Condition="'$(GenevaTelemetry)' == 'true'">
<PackageReference Include="OpenTelemetry" Version="1.2.0-rc2" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.2.0-rc2" />
<PackageReference Include="OpenTelemetry.Exporter.Geneva" Version="1.2.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc9" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc9" />
<PackageReference Include="OpenTelemetry" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Exporter.Geneva" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="swagger.json" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
using OpenTelemetry.Trace;
using OpenTelemetry.Metrics;
using OpenTelemetry.Exporter.Geneva;
using System.Diagnostics.Metrics;
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Collections.Generic;
#endif

Expand All @@ -31,7 +27,8 @@ public Startup(IConfiguration configuration)
public void ConfigureServices(IServiceCollection services)
{
#if GENEVA_TELEMETRY
services.AddOpenTelemetryMetrics((builder) => builder
services.AddOpenTelemetry()
.WithMetrics((builder) => builder
.AddAspNetCoreInstrumentation()
.AddGenevaMetricExporter(options =>
{
Expand Down
Loading
Loading