Skip to content

Commit 1889fd3

Browse files
committed
Updated ci config
1 parent 9d3bd88 commit 1889fd3

File tree

1 file changed

+2
-49
lines changed

1 file changed

+2
-49
lines changed

.ci/run-tests

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,14 @@ set -x
2020

2121
function cleanup {
2222
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
2423
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
2624
docker network rm esnet-oss > /dev/null
27-
docker network rm esnet-platinum > /dev/null
2825
}
2926

3027
trap cleanup EXIT
3128

3229
# create network and volume
3330
docker network create esnet-oss
34-
docker network create esnet-platinum
3531

3632
# create client image
3733
docker build \
@@ -47,63 +43,20 @@ docker run \
4743
--env "path.repo=/tmp" \
4844
--env "repositories.url.allowed_urls=http://snapshot.*" \
4945
--env "discovery.type=single-node" \
46+
--env "xpack.security.enabled=false" \
5047
--network=esnet-oss \
5148
--name=elasticsearch-oss \
5249
--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 \
8650
docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
8751

8852
# run the client unit and oss integration test
8953
docker run \
9054
--network=esnet-oss \
9155
--env "TEST_ES_SERVER=http://elasticsearch-oss:9200" \
9256
--env "CODECOV_TOKEN" \
93-
--volume $repo:/usr/src/app \
57+
--volume $(pwd):/usr/src/app \
9458
--volume /usr/src/app/node_modules \
9559
--name elasticsearch-js-oss \
9660
--rm \
9761
elastic/elasticsearch-js \
9862
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

Comments
 (0)