-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathrun-repository.ps1
42 lines (30 loc) · 1.26 KB
/
run-repository.ps1
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
# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable
# NETWORK_NAME -- The docker network name
# NODE_NAME -- The docker container name also used as Elasticsearch node name
# DOTNET_VERSION -- SDK version (defined in test-matrix.yml, a default is hardcoded here)
param(
[System.Uri]
$ELASTICSEARCH_URL,
[string]
$NETWORK_NAME,
[string]
$NODE_NAME,
[string]
$DOTNET_VERSION = "8.0.400"
)
$ESC = [char]27
Write-Output "$ESC[34;1mINFO:$ESC[0m URL ${ELASTICSEARCH_URL}$ESC[0m"
Write-Output "$ESC[34;1mINFO:$ESC[0m DOTNET_VERSION ${DOTNET_VERSION}$ESC[0m"
Write-Output "$ESC[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>$ESC[0m"
docker build --file .buildkite/DockerFile --tag elastic/elasticsearch-net .
Write-Output "$ESC[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>$ESC[0m"
mkdir -p build/output -ErrorAction Ignore
$repo = Get-Location
docker run `
--network="`"$NETWORK_NAME`"" `
--env "DOTNET_VERSION=$DOTNET_VERSION" `
--name test-runner `
--volume $repo/build/output:/sln/build/output `
--rm `
elastic/elasticsearch-net `
./build.sh rest-spec-tests -f count -e $ELASTICSEARCH_URL -o /sln/build/output/rest-spec-junit.xml