Skip to content

Commit 3e1dfa3

Browse files
committed
Feature/azure pipelines fixes (#3625)
* only test the 5 most important cluster setups * publish integ test results even if the testrunner reports an exit code * make sure latest 2.2 SDK is installed, build works on my local linux env * AssemblyOriginatorKeyFile not hardcoded path * sign Test.Domain directly see if that resolves CI * Directory.Build.props capital B * included copy paste of pwd in file 🤦 * move condition of task one up, we always want to try and report the integration test results * attempt to also report the reproduce line to Azure Pipelines (cherry picked from commit 5b4b06c)
1 parent 67d9b69 commit 3e1dfa3

File tree

5 files changed

+30
-18
lines changed

5 files changed

+30
-18
lines changed

azure-pipelines.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,21 @@ jobs:
2323
testResultsFiles: 'src/Tests/Tests/**/*.trx'
2424
testRunTitle: Windows Unit Tests
2525

26-
# Enable this when backporting to 7.x 6.x and 5.x, master not in integratable state until 7.x stabalizes and merged to master again
27-
#- job: WindowsIntegrationTests
28-
# dependsOn: WindowsCanaryTests
29-
# pool:
30-
# vmImage: 'vs2017-win2016'
31-
# strategy:
32-
# maxParallel: 5
33-
# matrix:
34-
# es653:
35-
# esVersion: '6.5.3'
36-
# es632:
37-
# esVersion: '6.3.2'
38-
# steps:
39-
# - script: 'build.bat integrate $(esVersion) skipdocs'
40-
# displayName: '$(esVersion) integration tests'
26+
- job: WindowsIntegrationTests
27+
dependsOn: WindowsCanaryTests
28+
pool:
29+
vmImage: 'vs2017-win2016'
30+
strategy:
31+
maxParallel: 5
32+
matrix:
33+
es7:
34+
esVersion: '7.0.0-beta1'
35+
steps:
36+
- script: 'build.bat integrate $(esVersion) "readonly,writable,bool,xpack" skipdocs'
37+
displayName: '$(esVersion) integration tests'
38+
- task: PublishTestResults@2
39+
condition: succeededOrFailed()
40+
inputs:
41+
testRunner: VSTest
42+
testResultsFiles: 'src/Tests/Tests/**/*.trx'
43+
testRunTitle: '$(esVersion) Integration Tests'
File renamed without changes.

src/Elasticsearch.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RelatedFiles", "RelatedFile
88
..\src\PublishArtifacts.build.props = ..\src\PublishArtifacts.build.props
99
..\src\Artifacts.build.props = ..\src\Artifacts.build.props
1010
..\src\Library.build.props = ..\src\Library.build.props
11-
Directory.build.props = Directory.build.props
11+
Directory.Build.props = Directory.Build.props
1212
EndProjectSection
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeGeneration", "CodeGeneration", "{93331BEE-0AA0-47B7-B1D2-BD5BD31634D1}"
@@ -29,7 +29,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nest.JsonNetSerializer", "S
2929
EndProject
3030
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{6C4A2627-AF22-4388-9DF7-7A9AEACFD635}"
3131
ProjectSection(SolutionItems) = preProject
32-
Tests\Directory.build.props = Tests\Directory.build.props
32+
Tests\Directory.Build.props = Tests\Directory.Build.props
3333
EndProjectSection
3434
EndProject
3535
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests\Tests.csproj", "{5B393962-7586-49BA-BD99-3B1E35F48E94}"

src/Tests/Directory.build.props renamed to src/Tests/Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
<PropertyGroup Condition="'$(TestPackageVersion)'!=''">
44
<RestoreSources>../../../build/output/_packages;https://api.nuget.org/v3/index.json</RestoreSources>
55
</PropertyGroup>
6+
<PropertyGroup>
7+
<SignAssembly>true</SignAssembly>
8+
<AssemblyOriginatorKeyFile>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.bat))\build\keys\keypair.snk</AssemblyOriginatorKeyFile>
9+
</PropertyGroup>
610
</Project>

src/Tests/Tests.Core/Xunit/NestXunitRunOptions.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,17 @@ private static void DumpReproduceFilters(ConcurrentBag<Tuple<string, string>> fa
7373
var config = TestConfiguration.Instance;
7474
var runningIntegrations = config.RunIntegrationTests;
7575
Console.ForegroundColor = ConsoleColor.Yellow;
76-
///
7776
Console.WriteLine("---Reproduce: -----");
7877
var reproduceLine = ReproduceCommandLine(failedCollections, config, runningIntegrations);
7978
Console.WriteLine(reproduceLine);
8079
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TEAMCITY_VERSION")))
8180
Console.WriteLine($"##teamcity[buildProblem description='{reproduceLine}']");
81+
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TF_BUILD")))
82+
{
83+
var count = failedCollections.Count;
84+
Console.WriteLine($"##vso[task.logissue type=error;]{count} test failures");
85+
Console.WriteLine($"##vso[task.logissue type=error;]{reproduceLine}");
86+
}
8287
Console.WriteLine("--------");
8388
}
8489

0 commit comments

Comments
 (0)