Welcome to mirror list, hosted at ThFree Co, Russian Federation.

linux.yml « enterprise « libraries « pipelines « eng - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2a6e5ea99e880d6e712e849fe7d4a860cccd0d9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

# Disable pipeline for ordinary pushes to the branches
trigger: none

# To reduce load on the pipeline, enable it only for PRs that affect critical networking code
pr:
  branches:
    include:
    - main
    - release/*.*

  paths:
    # If you are changing these and start including eng/common, adjust the Maestro subscriptions
    # so that this build can block dependency auto-updates (this build is currently ignored)
    include:
      - eng/pipelines/libraries/enterprise/*
      - src/libraries/Common/src/System/Net/*
      - src/libraries/Common/tests/System/Net/*
      - src/native/libs/System.Net.Security.Native/*
      - src/libraries/System.Net.Http/*
      - src/libraries/System.Net.Security/*

variables:
  - template: ../variables.yml
  - name: enterpriseTestsSetup
    value: $(sourcesRoot)/Common/tests/System/Net/EnterpriseTests/setup
  - name: containerRunTestsCommand
    value: /repo/dotnet.sh build /t:test
  - name: containerLibrariesRoot
    value: /repo/src/libraries

jobs:
- job: EnterpriseLinuxTests
  timeoutInMinutes: 120
  pool:
    name: NetCore-Svc-Public
    demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
  steps:
  - bash: |
      cd $(enterpriseTestsSetup)
      docker-compose build
    displayName: Build test machine images
    env:
      DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory)

  - bash: |
      cd $(enterpriseTestsSetup)
      docker-compose up -d
    displayName: Start test network and machines
    env:
      DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory)

  - bash: |
      docker exec linuxclient bash /setup/test-webserver.sh
    displayName: Test linuxclient connection to web server

  - bash: |
      docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci /p:NativeOptimizationDataSupported=false'
      docker exec linuxclient bash -c '/repo/dotnet.sh build $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj'
      docker exec linuxclient bash -c '/repo/dotnet.sh build $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj'
    displayName: Build product sources

  - bash: |
      docker exec linuxclient bash -c 'if [ -f /erc/resolv.conf.ORI ]; then cp -f /erc/resolv.conf.ORI /etc/resolv.conf; fi'
      docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj
      docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj
    displayName: Build and run tests

  - bash: |
      cd $(enterpriseTestsSetup)
      docker-compose down
    displayName: Stop test network and machines
    env:
      DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory)

  - task: PublishTestResults@2
    inputs:
      testRunner: 'xUnit'
      testResultsFiles: '**/testResults.xml'
      testRunTitle: 'Enterprise Tests'
      mergeTestResults: true
      failTaskOnFailedTests: true