@@ -20,18 +20,14 @@ set -x
20
20
21
21
function cleanup {
22
22
docker container rm --force --volumes elasticsearch-oss > /dev/null 2>&1 || true
23
- docker container rm --force --volumes elasticsearch-platinum > /dev/null 2>&1 || true
24
23
docker container rm --force --volumes elasticsearch-js-oss > /dev/null 2>&1 || true
25
- docker container rm --force --volumes elasticsearch-js-platinum > /dev/null 2>&1 || true
26
24
docker network rm esnet-oss > /dev/null
27
- docker network rm esnet-platinum > /dev/null
28
25
}
29
26
30
27
trap cleanup EXIT
31
28
32
29
# create network and volume
33
30
docker network create esnet-oss
34
- docker network create esnet-platinum
35
31
36
32
# create client image
37
33
docker build \
@@ -47,63 +43,20 @@ docker run \
47
43
--env " path.repo=/tmp" \
48
44
--env " repositories.url.allowed_urls=http://snapshot.*" \
49
45
--env " discovery.type=single-node" \
46
+ --env " xpack.security.enabled=false" \
50
47
--network=esnet-oss \
51
48
--name=elasticsearch-oss \
52
49
--detach \
53
- docker.elastic.co/elasticsearch/elasticsearch-oss:${ELASTICSEARCH_VERSION}
54
-
55
- # run elasticsearch platinum
56
- repo=$( pwd)
57
- testnodecrt=" /.ci/certs/testnode.crt"
58
- testnodekey=" /.ci/certs/testnode.key"
59
- cacrt=" /.ci/certs/ca.crt"
60
-
61
- docker run \
62
- --rm \
63
- --env " node.attr.testattr=test" \
64
- --env " path.repo=/tmp" \
65
- --env " repositories.url.allowed_urls=http://snapshot.*" \
66
- --env " discovery.type=single-node" \
67
- --env " ES_JAVA_OPTS=-Xms1g -Xmx1g" \
68
- --env " ELASTIC_PASSWORD=changeme" \
69
- --env " xpack.security.enabled=true" \
70
- --env " xpack.license.self_generated.type=trial" \
71
- --env " xpack.security.http.ssl.enabled=true" \
72
- --env " xpack.security.http.ssl.verification_mode=certificate" \
73
- --env " xpack.security.http.ssl.key=certs/testnode.key" \
74
- --env " xpack.security.http.ssl.certificate=certs/testnode.crt" \
75
- --env " xpack.security.http.ssl.certificate_authorities=certs/ca.crt" \
76
- --env " xpack.security.transport.ssl.enabled=true" \
77
- --env " xpack.security.transport.ssl.key=certs/testnode.key" \
78
- --env " xpack.security.transport.ssl.certificate=certs/testnode.crt" \
79
- --env " xpack.security.transport.ssl.certificate_authorities=certs/ca.crt" \
80
- --volume " $repo$testnodecrt :/usr/share/elasticsearch/config/certs/testnode.crt" \
81
- --volume " $repo$testnodekey :/usr/share/elasticsearch/config/certs/testnode.key" \
82
- --volume " $repo$cacrt :/usr/share/elasticsearch/config/certs/ca.crt" \
83
- --network=esnet-platinum \
84
- --name=elasticsearch-platinum \
85
- --detach \
86
50
docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
87
51
88
52
# run the client unit and oss integration test
89
53
docker run \
90
54
--network=esnet-oss \
91
55
--env " TEST_ES_SERVER=http://elasticsearch-oss:9200" \
92
56
--env " CODECOV_TOKEN" \
93
- --volume $repo :/usr/src/app \
57
+ --volume $( pwd ) :/usr/src/app \
94
58
--volume /usr/src/app/node_modules \
95
59
--name elasticsearch-js-oss \
96
60
--rm \
97
61
elastic/elasticsearch-js \
98
62
npm run ci
99
-
100
- # run the client platinium integration test
101
- docker run \
102
- --network=esnet-platinum \
103
- --env " TEST_ES_SERVER=https://elastic:changeme@elasticsearch-platinum:9200" \
104
- --volume $repo :/usr/src/app \
105
- --volume /usr/src/app/node_modules \
106
- --name elasticsearch-js-platinum \
107
- --rm \
108
- elastic/elasticsearch-js \
109
- npm run test:integration
0 commit comments