Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
5d6d04b
stage
Mpdreamz Aug 13, 2019
d782565
stage
Mpdreamz Aug 21, 2019
3c92c6c
stage
Mpdreamz Aug 21, 2019
2ce1023
stage
Mpdreamz Aug 21, 2019
881c730
stage
Mpdreamz Aug 21, 2019
1b328fc
stage
Mpdreamz Aug 21, 2019
de926e7
stage
Mpdreamz Aug 21, 2019
71e8897
stage
Mpdreamz Aug 22, 2019
0bfd95f
stage
Mpdreamz Aug 22, 2019
ec7336d
stage
Mpdreamz Aug 22, 2019
f4feabd
stage
Mpdreamz Aug 22, 2019
9ac6c89
stage
Mpdreamz Aug 22, 2019
d4dd01a
stage
Mpdreamz Aug 23, 2019
ab1171c
stage
Mpdreamz Aug 26, 2019
c9c86ff
stage
Mpdreamz Aug 26, 2019
c74ae3a
stage
Mpdreamz Aug 26, 2019
2b03bbb
stage
Mpdreamz Aug 26, 2019
9ecceb5
stage
Mpdreamz Aug 27, 2019
796dba6
stage
Mpdreamz Aug 27, 2019
4d38f3f
stage
Mpdreamz Aug 27, 2019
53f6279
stage
Mpdreamz Aug 27, 2019
f3f4571
stage
Mpdreamz Aug 27, 2019
9d055c3
stage
Mpdreamz Aug 27, 2019
51c3f09
stage
Mpdreamz Aug 27, 2019
7f09dba
stage
Mpdreamz Aug 29, 2019
be433fd
stage
Mpdreamz Aug 30, 2019
36fbb09
stage
Mpdreamz Sep 6, 2019
e3fdff9
stage, now actually sends querystring parameters
Mpdreamz Sep 9, 2019
19e1ce4
stage
Mpdreamz Sep 12, 2019
fad776a
stage
Mpdreamz Sep 13, 2019
4e2a571
stage
Mpdreamz Sep 13, 2019
74d01a4
DynamicResponse now useful in the context of yaml runner
Mpdreamz Sep 16, 2019
594d8a6
support _arbitrary_key_
Mpdreamz Sep 16, 2019
56ae142
more assertions
Mpdreamz Sep 19, 2019
ae4bd8a
more assertions
Mpdreamz Sep 20, 2019
169ff53
more assertions
Mpdreamz Sep 20, 2019
bd1b732
gh workflow, some changes to allow client url to be passed on commandlie
Mpdreamz Oct 1, 2019
498be91
update workflow
Mpdreamz Oct 1, 2019
bc844b0
update docker image ref
Mpdreamz Oct 1, 2019
5290461
update docker image ref
Mpdreamz Oct 1, 2019
f6af055
update health checks
Mpdreamz Oct 1, 2019
55b739c
attach for visibility
Mpdreamz Oct 1, 2019
58131f8
--no-healthcheck not valid with -a
Mpdreamz Oct 1, 2019
11345d6
no health check
Mpdreamz Oct 1, 2019
a81cc09
add limits
Mpdreamz Oct 1, 2019
ced791e
explicit hostname
Mpdreamz Oct 1, 2019
fddba01
single node discovery
Mpdreamz Oct 1, 2019
2dbb3c7
minimize options
Mpdreamz Oct 1, 2019
6fb986b
wrong .NET sdk
Mpdreamz Oct 1, 2019
aedc9f4
dotnet-run should have been dotnet run
Mpdreamz Oct 1, 2019
ed3a5b6
need -- to separate args
Mpdreamz Oct 1, 2019
ff1907a
https://github.com/actions/setup-dotnet/issues/29 :sadpanda:
Mpdreamz Oct 1, 2019
e14841f
print some info to assert container information
Mpdreamz Oct 2, 2019
78dd18c
cleaned up program a bit now discovers revision to download from runn…
Mpdreamz Oct 2, 2019
a5fb658
junit xml exporter
Mpdreamz Oct 6, 2019
9e75865
can now pass in output file as arg, report totals on stdout
Mpdreamz Oct 6, 2019
40d7151
export to artifacts
Mpdreamz Oct 6, 2019
ba2e195
yaml
Mpdreamz Oct 6, 2019
53f2064
yaml spacing
Mpdreamz Oct 6, 2019
af63bca
make sure build/output exists
Mpdreamz Oct 6, 2019
be1e6b5
always upload artifact
Mpdreamz Oct 6, 2019
4ec1995
test out logging commands
Mpdreamz Oct 6, 2019
d0ae397
update es container config
Mpdreamz Oct 6, 2019
89a385e
reenable ES_JAVA_OPTS
Mpdreamz Oct 6, 2019
4571ad1
java opts not able to set to 1g enable memory_lock
Mpdreamz Oct 6, 2019
7a83f74
drop single-node discovery-type
Mpdreamz Oct 6, 2019
2c35dc8
back to single node
Mpdreamz Oct 6, 2019
438a4ef
stage
Mpdreamz Oct 7, 2019
b59f1aa
.jenkins build
Mpdreamz Oct 8, 2019
efb7bd6
update our .jenkins folder
Mpdreamz Oct 8, 2019
9c8f114
update runner to pretty print failures
Mpdreamz Oct 8, 2019
ebba665
move from .jenkins folder to .ci
Mpdreamz Oct 8, 2019
ce65849
add readme to the .ci folder
Mpdreamz Oct 8, 2019
857cea5
attempt to show logs in github actions
Mpdreamz Oct 8, 2019
5ed11e5
disable github actions for now
Mpdreamz Oct 8, 2019
3e81297
regenerate code after rebase
Mpdreamz Oct 8, 2019
cf62872
unit test for __arbitrary_key__ used the wrong meaning
Mpdreamz Oct 8, 2019
139fdad
Add PowerShell scripts to run on Windows
russcam Oct 14, 2019
7d6daa3
added --profile switch to yaml runner that waits before running the t…
Mpdreamz Oct 15, 2019
b541715
update ci jobs go-elasticsearch references
Mpdreamz Oct 15, 2019
4bdd60c
Update src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs
Mpdreamz Oct 15, 2019
a522035
only automatically set proxy on client if we see mitmproxy running
Mpdreamz Oct 15, 2019
b9b202b
Update src/Tests/Tests.YamlRunner/DoMapper.fs
Mpdreamz Oct 15, 2019
94fdcf2
Update .ci/run-tests
Mpdreamz Oct 15, 2019
df57708
Addressed various PR feedback
Mpdreamz Oct 15, 2019
8ae2cb4
Merge branch 'feature/master/yaml-test-runner' of github.com:elastic/…
Mpdreamz Oct 15, 2019
8b034c2
Merge branch 'master' into feature/master/yaml-test-runner
Mpdreamz Oct 15, 2019
0de5317
Merge branch 'master' into feature/master/yaml-test-runner
Mpdreamz Oct 15, 2019
76b14d1
Merge branch 'master' into feature/master/yaml-test-runner
Mpdreamz Oct 25, 2019
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
32 changes: 32 additions & 0 deletions .ci/DockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ARG DOTNET_VERSION=3.0.100
FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} AS elasticsearch-net-build

WORKDIR /sln

COPY ./*.sln ./nuget.config ./
COPY ./src/*.sln ./src/

# todo standardize on Build.props as Directory.Build.props needs that form
COPY ./src/*.Build.props ./src/*.build.props ./src/

# consider flattening our repos to just projects under ./src and ./test

# Copy the main source project files
COPY src/*/*.?sproj ./src/
COPY src/Tests/*/*.?sproj ./src/Tests/
COPY src/Auxiliary/*/*.?sproj ./src/Auxiliary/
COPY src/CodeGeneration/*/*.?sproj ./src/CodeGeneration/
COPY src/Examples/*/*.?sproj ./src/Examples/

# this puts the project files back into original location since COPY flattens
RUN for file in $(find . -name "*.?sproj"); do mkdir -p $(dirname $file)/$(basename ${file%.*})/ && mv $file $(dirname $file)/$(basename ${file%.*})/; done

# copy these manually since these do not follow a pattern under src
COPY build/scripts/scripts.fsproj ./build/scripts/
COPY .ci/Jenkins.csproj ./.ci/

RUN dotnet restore src/Elasticsearch.sln

# Install app dependencies

COPY . .
7 changes: 7 additions & 0 deletions .ci/Jenkins.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>
20 changes: 20 additions & 0 deletions .ci/certs/ca.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDSTCCAjGgAwIBAgIUIwN+0zglsexRKwE1RGHvlCcmrdwwDQYJKoZIhvcNAQEL
BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l
cmF0ZWQgQ0EwHhcNMTkwMjEzMDcyMjQwWhcNMjIwMjEyMDcyMjQwWjA0MTIwMAYD
VQQDEylFbGFzdGljIENlcnRpZmljYXRlIFRvb2wgQXV0b2dlbmVyYXRlZCBDQTCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANILs0JO0e7x29zeVx21qalK
XKdX+AMlGJPH75wWO/Jq6YHtxt1wYIg762krOBXfG6JsFSOIwIv5VrzGGRGjSPt9
OXQyXrDDiQvsBT3rpzLNdDs7KMl2tZswwv7w9ujgud0cYnS1MOpn81rfPc73DvMg
xuhplofDx6fn3++PjVRU2FNiIVWyEoaxRjCeGPMBubKZYaYbQA6vYM4Z+ByG727B
AyAER3t7xmvYti/EoO2hv2HQk5zgcj/Oq3AJKhnt8LH8fnfm3TnYNM1htvXqhN05
vsvhvm2PHfnA5qLlSr/3W0aI/U/PqfsFDCgyRV097sMIaKkmavb0Ue7aQ7lgtp0C
AwEAAaNTMFEwHQYDVR0OBBYEFDRKlCMowWR1rwxE0d1lTEQe5O71MB8GA1UdIwQY
MBaAFDRKlCMowWR1rwxE0d1lTEQe5O71MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
hvcNAQELBQADggEBAKbCJ95EBpeuvF70KEt6QU70k/SH1NRvM9YzKryV0D975Jvu
HOSm9HgSTULeAUFZIa4oYyf3QUfVoI+2T/aQrfXA3gfrJWsHURkyNmiHOFAbYHqi
xA6i249G2GTEjc1+le/M2N2CcDKAmurW6vSGK4upXQbPd6KmnhHREX74zkWjnOa+
+tibbSSOCT4Tmja2DbBxAPuivU9IB1g/hIUmbYQqKffQrBJA0658tz6w63a/Q7xN
pCvvbSgiMZ6qcVIcJkBT2IooYie+ax45pQECHthgIUcQAzfmIfqlU0Qfl8rDgAmn
0c1o6HQjKGU2aVGgSRuaaiHaSZjbPIZVS51sOoI=
-----END CERTIFICATE-----
19 changes: 19 additions & 0 deletions .ci/certs/testnode.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDIjCCAgqgAwIBAgIUI4QU6jA1dYSCbdIA6oAb2TBEluowDQYJKoZIhvcNAQEL
BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l
cmF0ZWQgQ0EwHhcNMTkwMjEzMDcyMzEzWhcNMjIwMjEyMDcyMzEzWjATMREwDwYD
VQQDEwhpbnN0YW5jZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJeT
yOy6EAScZxrULKjHePciiz38grivCrhFFV+dThaRCcl3DhDzb9Eny5q5iEw3WvLQ
Rqmf01jncNIhaocTt66VqveXaMubbE8O0LcG6e4kpFO+JtnVF8JTARTc+ux/1uD6
hO1VG/HItM7WQrQxh4hfB2u1AX2YQtoqEtXXEC+UHWfl4QzuzXjBnKCkO/L9/6Tf
yNFQWXxKnIiTs8Xm9sEhhSCBJPlLTQu+MX4vR2Uwj5XZmflDUr+ZTenl9qYxL6b3
SWhh/qEl4GAj1+tS7ZZOxE0237mUh3IIFYSWSaMm8K2m/BYHkLNWL5B1dMic0lsv
osSoYrQuCef4HQMCitsCAwEAAaNNMEswHQYDVR0OBBYEFFMg4l1GLW8lYbwASY+r
YeWYRzIiMB8GA1UdIwQYMBaAFDRKlCMowWR1rwxE0d1lTEQe5O71MAkGA1UdEwQC
MAAwDQYJKoZIhvcNAQELBQADggEBAEQrgh1xALpumQTzsjxFRGque/vlKTgRs5Kh
xtgapr6wjIbdq7dagee+4yNOKzS5lGVXCgwrJlHESv9qY0uumT/33vK2uduJ7NAd
fR2ZzyBnhMX+mkYhmGrGYCTUMUIwOIQYa4Evis4W+LHmCIDG03l7gLHfdIBe9VMO
pDZum8f6ng0MM49s8/rXODNYKw8kFyUhnfChqMi/2yggb1uUIfKlJJIchkgYjE13
zuC+fjo029Pq1jeMIdxugLf/7I/8NiW1Yj9aCXevUXG1qzHFEuKAinBXYOZO/vWS
LaEqOhwrzNynwgGpYAr7Rfgv4AflltYIIav4PZT03P7fbyAAf8s=
-----END CERTIFICATE-----
27 changes: 27 additions & 0 deletions .ci/certs/testnode.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpQI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nmzAoGBAIkx3w3WywFQxtblmyeB
qbd7F2IaE23XoxyjX+tBEQ4qQqwcoSE0v8TXHIBEwjceeX+NLVhn9ClJYVniLRq+
oL3VVqVyzB4RleJZCc98e3PV1yyFx/b1Uo3pHOsXX9lKeTjKwV9v0rhFGzPEgP3M
yOvXA8TG0FnM6OLUg/D6GX0JAoGAMuHS4TVOGeV3ahr9mHKYiN5vKNgrzka+VEod
L9rJ/FQOrfADpyCiDen5I5ygsXU+VM3oanyK88NpcVlxOGoMft0M+OYoQVWKE7lO
ZKYhBX6fGqQ7pfUJPXXIOgwfmni5fZ0sm+j63g3bg10OsiumKGxaQJgXhL1+3gQg
Y7ZwibUCgYEAlZoFFvkMLjpOSaHk1z5ZZnt19X0QUIultBwkumSqMPm+Ks7+uDrx
thGUCoz4ecr/ci4bIUY7mB+zfAbqnBOMxreJqCRbAIuRypo1IlWkTp8DywoDOfMW
NfzjVmzJ7EJu44nGmVAi1jw4Pbseivvi1ujMCoPgaE8I1uSh144bwN8=
-----END RSA PRIVATE KEY-----
78 changes: 78 additions & 0 deletions .ci/jobs/defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---

##### GLOBAL METADATA

- meta:
cluster: clients-ci

##### JOB DEFAULTS

- job:
project-type: matrix
logrotate:
daysToKeep: 30
numToKeep: 100
parameters:
- string:
name: branch_specifier
default: refs/heads/master
description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
&lt;commitId&gt;, etc.)
properties:
- github:
url: https://github.com/elastic/elasticsearch-net/
- inject:
properties-content: HOME=$JENKINS_HOME
concurrent: true
node: flyweight
scm:
- git:
name: origin
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
reference-repo: /var/lib/jenkins/.git-references/elasticsearch-net.git
branches:
- ${branch_specifier}
url: git@github.com:elastic/elasticsearch-net.git
basedir: ''
wipe-workspace: 'True'
triggers:
- github
axes:
- axis:
type: slave
name: label
values:
- linux
- axis:
type: yaml
filename: .ci/test-matrix.yml
name: ELASTICSEARCH_VERSION
- axis:
type: yaml
filename: .ci/test-matrix.yml
name: DOTNET_VERSION
- axis:
type: yaml
filename: .ci/test-matrix.yml
name: TEST_SUITE
yaml-strategy:
exclude-key: exclude
filename: .ci/test-matrix.yml
wrappers:
- ansicolor
- timeout:
type: absolute
timeout: 120
fail: true
- timestamps
- workspace-cleanup
builders:
- shell: |-
#!/usr/local/bin/runbld
.ci/run-tests
publishers:
- email:
recipients: infra-root+build@elastic.co
- junit:
results: "build/output/*-junit.xml"
allow-empty-results: true
14 changes: 14 additions & 0 deletions .ci/jobs/elastic+elasticsearch-net+7.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- job:
name: elastic+elasticsearch-net+7.x
display-name: 'elastic / elasticsearch-net # 7.x'
description: Testing the elasticsearch-net 7.x branch.
junit_results: "*-junit.xml"
parameters:
- string:
name: branch_specifier
default: refs/heads/7.x
description: The Git branch specifier to build
triggers:
- github
- timed: '@daily'
14 changes: 14 additions & 0 deletions .ci/jobs/elastic+elasticsearch-net+master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- job:
name: elastic+elasticsearch-net+master
display-name: 'elastic / elasticsearch-net # master'
description: Testing the elasticsearch-net master branch.
junit_results: "*-junit.xml"
parameters:
- string:
name: branch_specifier
default: refs/heads/master
description: The Git branch specifier to build
triggers:
- github
- timed: '@daily'
67 changes: 67 additions & 0 deletions .ci/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
## Jenkins test folder

This `.ci` folder is used by https://clients-ci.elastic.co

Where each Elasticsearch client runs the [rest api spec test](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/test)
as defined by the Elasticsearch team.

Each client starts the cluster using the same `.ci/run-elasticsearch` from `run-tests` and then bootstraps there own `rest api test runner`.api

The .NET rest api spec runner lives under `src/Tests/Test.YamlRunner`. This runner takes the test yaml files and turns them into .NET instructions.api

Each `do` section in the yaml is mapped to a low level client method. To aid with assertions the tests ask for `DynamicResponse` which is a great
way to deal with elasticsearch responses in a semi typed fashion.

These `rest-api-spec` tests are in addition to the unit and integration tests that live under `src/Tests/Tests` which for 90% of the cases focuses
more on the high level client `NEST` where as these `rest-api-spec` test fully focus on the low level client `Elasticsearch.Net`

The `DockerFile` in this folder sets up this repos inside a docker container ready to run our build.

The `rest-api-spec` runner expects Elasticsearch to be started before invocation and uses the endpoint its passed to discover the current Elasticsearch
`build hash` that is running and downloads the tests matching that `build hash`.

If you want to run the tests the same that the Jenkins instance on elastic.co does you can call

```bash
$ ELASTICSEARCH_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests
```

| Variable Name | Default | Description |
|-------------------------|-------------|-------------|
| `ELASTICSEARCH_VERSION` | `N/A` | The elasticsearch version to target
| `TEST_SUITE` | `oss` | `oss` or `xpack` sets which test suite to run and which container to run against. |
| `DOTNET_VERSION` | `3.0.100` | The .NET sdk version used to grab the proper container |


If you want to manually spin up elasticsearch for this tests and call the runner afterwards you can use

```bash
$ ELASTICSEARCH_VERSION=elasticsearch-oss:8.0.0-SNAPSHOT DETACH=true bash .ci/run-elasticsearch.sh
```

Note that `ELASTICSEARCH_VERSION` here is the full docker reference, `.ci/run-tests` is smart enough to compose this based on `TEST_SUITE`

Spinning down the cluster can be done by passing `CLEANUP=true` using the same args

```bash
$ ELASTICSEARCH_VERSION=elasticsearch-oss:8.0.0-SNAPSHOT CLEANUP=true bash .ci/run-elasticsearch.sh
```

To kick off the `rest-api-spec` tests manually after starting the cluster manually:

```bash
$ ./build.sh rest-spec-tests -f create -e http://localhost:9200 -o /sln/build/output/rest-spec-junit.xml
```

See `--help` for a full command line reference

```bash
$ ./build.sh rest-spec-tests -f --help
```

Against in most cases running through `./ci/run-tests` is all you need:

```bash
$ ELASTICSEARCH_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests
```

Loading