Files
elasticsearch-js/.ci/run-tests
Tomas Della Vedova 9f17f820de Added codecov (#777)
2019-03-15 15:55:34 +01:00

22 lines
837 B
Bash
Executable File

#!/usr/bin/env bash
#
# Runs the client tests via Docker with the expectation that the required
# environment variables have already been exported before running this script.
#
# The required environment variables include:
#
# - $ELASTICSEARCH_VERSION
# - $NODE_JS_VERSION
#
set +x
export VAULT_TOKEN=$(vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
export CODECOV_TOKEN=$(vault read -field=token secret/clients-ci/elasticsearch-js/codecov)
unset VAULT_ROLE_ID VAULT_SECRET_ID VAULT_TOKEN
set -x
ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION} NODE_JS_VERSION=${NODE_JS_VERSION} docker-compose -f .ci/docker-compose.yml run client-oss
ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION} NODE_JS_VERSION=${NODE_JS_VERSION} docker-compose -f .ci/docker-compose.yml run client-platinum