From c8b30976bda7da116fc383a2863af21fa23a1441 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Thu, 25 Feb 2021 15:38:45 +0000 Subject: [PATCH] Update Azure Pipelines VMs to latest (#5355) * Update Azure Pipelines VMs to the latest versions * Disable code coverage for canary * Log extra info, shorten the timeout --- .ci/DockerFile | 4 +- .ci/make.sh | 2 +- .ci/readme.md | 2 +- .ci/run-repository.ps1 | 2 +- .ci/run-repository.sh | 2 +- .ci/run-tests.ps1 | 2 +- .ci/test-matrix.yml | 2 +- appveyor.yml | 2 +- azure-pipelines.yml | 77 +++++++++++++++++------------------- build/scripts/Commandline.fs | 2 +- build/scripts/Testing.fs | 2 +- build/scripts/Tooling.fs | 2 + 12 files changed, 49 insertions(+), 52 deletions(-) diff --git a/.ci/DockerFile b/.ci/DockerFile index a066b5d8b12..e09f0525222 100644 --- a/.ci/DockerFile +++ b/.ci/DockerFile @@ -1,5 +1,5 @@ -ARG DOTNET_VERSION=5.0.102 -FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-1 AS elasticsearch-net-build +ARG DOTNET_VERSION=5.0.103 +FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build WORKDIR /sln diff --git a/.ci/make.sh b/.ci/make.sh index 469920115c2..b67b46f8701 100755 --- a/.ci/make.sh +++ b/.ci/make.sh @@ -19,7 +19,7 @@ output_folder=".ci/output" OUTPUT_DIR="$repo/${output_folder}" mkdir -p "$OUTPUT_DIR" -DOTNET_VERSION=${DOTNET_VERSION-5.0.102} +DOTNET_VERSION=${DOTNET_VERSION-5.0.103} echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m" echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m" diff --git a/.ci/readme.md b/.ci/readme.md index 68d047d257b..1c4b2e7d500 100644 --- a/.ci/readme.md +++ b/.ci/readme.md @@ -30,7 +30,7 @@ $ STACK_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests |-------------------------|-------------|-------------| | `STACK_VERSION` | `N/A` | The elasticsearch version to target | `TEST_SUITE` | `basic` | `free` or `platinum` sets which test suite to run and which container to run against. | -| `DOTNET_VERSION` | `5.0.102` | The .NET sdk version used to grab the proper container | +| `DOTNET_VERSION` | `5.0.103` | The .NET sdk version used to grab the proper container | If you want to manually spin up elasticsearch for these tests and call the runner afterwards you can use diff --git a/.ci/run-repository.ps1 b/.ci/run-repository.ps1 index 52073cd1317..4ce3d380cc3 100644 --- a/.ci/run-repository.ps1 +++ b/.ci/run-repository.ps1 @@ -14,7 +14,7 @@ param( $NODE_NAME, [string] - $DOTNET_VERSION = "5.0.102" + $DOTNET_VERSION = "5.0.103" ) $ESC = [char]27 diff --git a/.ci/run-repository.sh b/.ci/run-repository.sh index 7027e716e7a..d40465df8e9 100755 --- a/.ci/run-repository.sh +++ b/.ci/run-repository.sh @@ -10,7 +10,7 @@ script_path=$(dirname $(realpath -s $0)) source $script_path/functions/imports.sh set -euo pipefail -DOTNET_VERSION=${DOTNET_VERSION-5.0.102} +DOTNET_VERSION=${DOTNET_VERSION-5.0.103} ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"} elasticsearch_container=${elasticsearch_container-} diff --git a/.ci/run-tests.ps1 b/.ci/run-tests.ps1 index de9e36c872b..b17f4431d0d 100644 --- a/.ci/run-tests.ps1 +++ b/.ci/run-tests.ps1 @@ -8,7 +8,7 @@ param ( $TEST_SUITE = "free", [string] - $DOTNET_VERSION = "5.0.102" + $DOTNET_VERSION = "5.0.103" ) $ESC = [char]27 diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml index 9a1159a1ca3..90885d85111 100755 --- a/.ci/test-matrix.yml +++ b/.ci/test-matrix.yml @@ -8,6 +8,6 @@ TEST_SUITE: - platinum DOTNET_VERSION: - - 5.0.102 + - 5.0.103 exclude: ~ diff --git a/appveyor.yml b/appveyor.yml index 2954c2bd1d9..b54e9b1c97f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ environment: DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true install: - - cmd: choco install dotnet-5.0-sdk --version 5.0.102 + - cmd: choco install dotnet-5.0-sdk --version 5.0.103 build_script: - cmd: build.bat canary diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e832e5bd3e2..e7381089094 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,23 +14,24 @@ pr: jobs: - job: StaleDocs pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-20.04' steps: - task: UseDotNet@2 inputs: - version: '5.0.102' + version: '5.0.103' - script: ./build.sh documentation displayName: 'Generate Documentation' - script: | if [ -n "$(git status --porcelain)" ]; then echo Error: changes found after running documentation; git diff; git status; exit 1; fi displayName: 'Ensure no uncommitted docs' + - job: LinuxUnitTests pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-20.04' steps: - task: UseDotNet@2 inputs: - version: '5.0.102' + version: '5.0.103' - script: ./build.sh test-one displayName: 'build and unit test' - task: PublishTestResults@2 @@ -58,60 +59,54 @@ jobs: - job: WindowsCanaryTests pool: - vmImage: 'vs2017-win2016' - steps: - - task: UseDotNet@2 - inputs: - version: '5.0.102' - - script: build.bat canary - displayName: 'build and unit test' - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - testRunner: VSTest - testResultsFiles: 'tests/**/*.trx' - testRunTitle: Windows Unit Tests + vmImage: 'windows-2019' + steps: + - script: build.bat canary + displayName: 'build and unit test' + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testRunner: VSTest + testResultsFiles: 'tests/**/*.trx' + testRunTitle: Windows Unit Tests - job: WindowsIntegrationTests dependsOn: WindowsCanaryTests pool: - vmImage: 'vs2017-win2016' + vmImage: 'windows-2019' strategy: maxParallel: 5 matrix: latest: esVersion: 'latest' steps: - - task: UseDotNet@2 - inputs: - version: '5.0.102' - - script: 'build.bat integrate-one $(esVersion) "readonly,writable,bool,xpack"' - displayName: '$(esVersion) windows integration tests' - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - testRunner: VSTest - testResultsFiles: 'tests/Tests/**/*.trx' - testRunTitle: '$(esVersion) Windows Integration Tests' + - script: 'build.bat integrate-one $(esVersion) "readonly,writable,bool,xpack"' + displayName: '$(esVersion) windows integration tests' + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testRunner: VSTest + testResultsFiles: 'tests/Tests/**/*.trx' + testRunTitle: '$(esVersion) Windows Integration Tests' - job: LinuxIntegrationTests dependsOn: LinuxUnitTests pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-20.04' strategy: maxParallel: 5 matrix: latest: esVersion: 'latest' steps: - - task: UseDotNet@2 - inputs: - version: '5.0.102' - - script: './build.sh integrate-one $(esVersion) "readonly,writable"' - displayName: '$(esVersion) linux integration tests' - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - testRunner: VSTest - testResultsFiles: 'tests/Tests/**/*.trx' - testRunTitle: '$(esVersion) Linux Integration Tests' + - task: UseDotNet@2 + inputs: + version: '5.0.103' + - script: './build.sh integrate-one $(esVersion) "readonly,writable"' + displayName: '$(esVersion) linux integration tests' + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testRunner: VSTest + testResultsFiles: 'tests/Tests/**/*.trx' + testRunTitle: '$(esVersion) Linux Integration Tests' diff --git a/build/scripts/Commandline.fs b/build/scripts/Commandline.fs index c39af38735d..4e423d26457 100644 --- a/build/scripts/Commandline.fs +++ b/build/scripts/Commandline.fs @@ -207,7 +207,7 @@ Execution hints can be provided anywhere on the command line parsed with CommandArguments = Test { TestFilter = None TrxExport = buildingOnAzurePipeline - CodeCoverage = buildingOnAzurePipeline + CodeCoverage = false } } diff --git a/build/scripts/Testing.fs b/build/scripts/Testing.fs index 43c0b5fe37e..383f6d68411 100644 --- a/build/scripts/Testing.fs +++ b/build/scripts/Testing.fs @@ -57,7 +57,7 @@ module Tests = let commandWithAdditionalOptions = wantsCoverage |> List.append wantsTrx |> List.append command - Tooling.DotNet.ExecInWithTimeout "." commandWithAdditionalOptions (TimeSpan.FromMinutes 60.) + Tooling.DotNet.ExecInWithTimeout "." commandWithAdditionalOptions (TimeSpan.FromMinutes 30.) let RunReleaseUnitTests version args = //xUnit always does its own build, this env var is picked up by Tests.csproj diff --git a/build/scripts/Tooling.fs b/build/scripts/Tooling.fs index 4079b6b33c2..ef13bbcadfe 100644 --- a/build/scripts/Tooling.fs +++ b/build/scripts/Tooling.fs @@ -38,6 +38,8 @@ module Tooling = let startArgs = ExecArguments(bin, args |> List.toArray) if (Option.isSome workinDir) then startArgs.WorkingDirectory <- Option.defaultValue "" workinDir + let options = args |> String.concat " " + printfn "Running command: %s %s" bin options let result = Proc.Exec(startArgs, timeout) try if not result.HasValue || result.Value > 0 then