|
| 1 | +# This pipeline deploys the test servers we are using to run (outerloop) Functional tests for various functionality in System.Net namespace. |
| 2 | +# The pipeline deploys to staging slots, which are available at |
| 3 | +# - corefx-net-http11-staging.azurewebsites.net |
| 4 | +# - corefx-net-http2-staging.azurewebsites.net |
| 5 | +# |
| 6 | +# Usage instructions: |
| 7 | +# 1) Start pipeline at https://dev.azure.com/dnceng/internal/_build?definitionId=1419 ( |
| 8 | +deploy-networking-echo-test-servers), pick the correct branch and start the build. |
| 9 | +# 2) After pipeline succeeds, check your changes against the staging slots, two possible ways to do this are: |
| 10 | +# - create a no-merge PR where you overwrite the default urls (e.g. https://github.com/dotnet/runtime/pull/111396) |
| 11 | +# - test locally, either by same changes as in above PR, or by using the override environment variables |
| 12 | +# |
| 13 | +# DOTNET_TEST_HTTPHOST=http://corefx-net-http11-staging.azurewebsites.net |
| 14 | +# DOTNET_TEST_SECUREHTTPHOST=https://corefx-net-http11-staging.azurewebsites.net |
| 15 | +# DOTNET_TEST_WEBSOKETHOST=http://corefx-net-http11-staging.azurewebsites.net |
| 16 | +# DOTNET_TEST_SECUREWEBSOKETHOST=http://corefx-net-http11-staging.azurewebsites.net |
| 17 | +# |
| 18 | +# DOTNET_TEST_HTTP2HOST=http://corefx-net-http2-staging.azurewebsites.net |
| 19 | +# 3) If there are no issues, you can swap the staging slots with production slots via the Azure portal. |
| 20 | +# Only the members of the .NET Networking team have access to the Azure Subscription which hosts the |
| 21 | +# servers. Look for the "Deployment slots" section at corefx-net-http11 and corefx-net-http2 Web Apps |
| 22 | + |
| 23 | +trigger: none |
| 24 | + |
| 25 | +resources: |
| 26 | + repositories: |
| 27 | + - repository: 1ESPipelineTemplates |
| 28 | + type: git |
| 29 | + name: 1ESPipelineTemplates/1ESPipelineTemplates |
| 30 | + ref: refs/tags/release |
| 31 | + |
| 32 | +variables: |
| 33 | + - template: /eng/common/templates-official/variables/pool-providers.yml |
| 34 | + - name: FrameworkVersion |
| 35 | + value: 8.x |
| 36 | + - name: TargetFramework |
| 37 | + value: net8.0 |
| 38 | + |
| 39 | +extends: |
| 40 | + template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates |
| 41 | + parameters: |
| 42 | + customBuildTags: |
| 43 | + - 1ES.PT.ViaStartRight |
| 44 | + pool: |
| 45 | + name: $(DncEngInternalBuildPool) |
| 46 | + image: 1es-windows-2022 |
| 47 | + os: windows |
| 48 | + |
| 49 | + stages: |
| 50 | + - stage: stage |
| 51 | + displayName: Building in a VM |
| 52 | + jobs: |
| 53 | + - job: job |
| 54 | + displayName: Build |
| 55 | + steps: |
| 56 | + - checkout: self |
| 57 | + |
| 58 | + - task: UseDotNet@2 |
| 59 | + inputs: |
| 60 | + packageType: "sdk" |
| 61 | + version: $(FrameworkVersion) |
| 62 | + |
| 63 | + - script: echo {} > ./global.json |
| 64 | + displayName: Bypass repository global.json |
| 65 | + workingDirectory: ./src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer |
| 66 | + |
| 67 | + - script: dotnet publish -c Release /p:GenevaTelemetry=true /p:_TargetFrameworkForXHarness=$(TargetFramework) |
| 68 | + workingDirectory: ./src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer |
| 69 | + displayName: Run dotnet publish |
| 70 | + |
| 71 | + - task: zip@0 |
| 72 | + displayName: Zip artifacts |
| 73 | + inputs: |
| 74 | + pathToZipFolder: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish\' |
| 75 | + pathToZipFile: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip' |
| 76 | + |
| 77 | + - task: AzureRmWebAppDeployment@4 |
| 78 | + displayName: Deploy to corefx-net-http11-staging |
| 79 | + inputs: |
| 80 | + ConnectionType: "AzureRM" |
| 81 | + azureSubscription: .NET Libraries Network Testing |
| 82 | + appType: "webApp" |
| 83 | + WebAppName: "corefx-net-http11" |
| 84 | + deployToSlotOrASE: true |
| 85 | + ResourceGroupName: "Production-WestUS" |
| 86 | + SlotName: "staging" |
| 87 | + package: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip' |
| 88 | + |
| 89 | + - task: AzureRmWebAppDeployment@4 |
| 90 | + displayName: Deploy to corefx-net-http2-staging |
| 91 | + inputs: |
| 92 | + ConnectionType: "AzureRM" |
| 93 | + azureSubscription: .NET Libraries Network Testing |
| 94 | + appType: "webApp" |
| 95 | + WebAppName: "corefx-net-http2" |
| 96 | + deployToSlotOrASE: true |
| 97 | + ResourceGroupName: "Production-WestUS" |
| 98 | + SlotName: "staging" |
| 99 | + package: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip' |
0 commit comments