[Backport 8.7] CI updates (#1835 (#1845)Co-authored-by: Josh Mock <josh@joshmock.com>

* Add jobs for testing missing 8.x branches

* Drop references to acceptance tests

They were removed in 1a227459f0

* Add myself as a contributor

😎

* Clean up shellcheck warnings

Co-authored-by: Josh Mock <josh@joshmock.com>
This commit is contained in:
github-actions[bot]
2023-04-13 14:19:17 -05:00
committed by GitHub
parent b750c61686
commit a2b68958c3
8 changed files with 99 additions and 19 deletions

View File

@ -0,0 +1,15 @@
---
- job:
name: elastic+elasticsearch-js+8.3
display-name: 'elastic / elasticsearch-js # 8.3'
description: Testing the elasticsearch-js 8.3 branch.
junit_results: "*-junit.xml"
parameters:
- string:
name: branch_specifier
default: refs/heads/8.3
description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
&lt;commitId&gt;, etc.)
triggers:
- github
- timed: 'H */12 * * *'

View File

@ -0,0 +1,15 @@
---
- job:
name: elastic+elasticsearch-js+8.4
display-name: 'elastic / elasticsearch-js # 8.3'
description: Testing the elasticsearch-js 8.4 branch.
junit_results: "*-junit.xml"
parameters:
- string:
name: branch_specifier
default: refs/heads/8.4
description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
&lt;commitId&gt;, etc.)
triggers:
- github
- timed: 'H */12 * * *'

View File

@ -0,0 +1,15 @@
---
- job:
name: elastic+elasticsearch-js+8.5
display-name: 'elastic / elasticsearch-js # 8.5'
description: Testing the elasticsearch-js 8.5 branch.
junit_results: "*-junit.xml"
parameters:
- string:
name: branch_specifier
default: refs/heads/8.5
description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
&lt;commitId&gt;, etc.)
triggers:
- github
- timed: 'H */12 * * *'

View File

@ -0,0 +1,15 @@
---
- job:
name: elastic+elasticsearch-js+8.6
display-name: 'elastic / elasticsearch-js # 8.6'
description: Testing the elasticsearch-js 8.6 branch.
junit_results: "*-junit.xml"
parameters:
- string:
name: branch_specifier
default: refs/heads/8.6
description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
&lt;commitId&gt;, etc.)
triggers:
- github
- timed: 'H */12 * * *'

View File

@ -0,0 +1,15 @@
---
- job:
name: elastic+elasticsearch-js+8.7
display-name: 'elastic / elasticsearch-js # 8.7'
description: Testing the elasticsearch-js 8.7 branch.
junit_results: "*-junit.xml"
parameters:
- string:
name: branch_specifier
default: refs/heads/8.7
description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
&lt;commitId&gt;, etc.)
triggers:
- github
- timed: 'H */12 * * *'

View File

@ -5,8 +5,8 @@
# TEST_SUITE -- which test suite to run: free or platinum # TEST_SUITE -- which test suite to run: free or platinum
# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable, a default is composed based on STACK_VERSION and TEST_SUITE # ELASTICSEARCH_URL -- The url at which elasticsearch is reachable, a default is composed based on STACK_VERSION and TEST_SUITE
# NODE_JS_VERSION -- node js version (defined in test-matrix.yml, a default is hardcoded here) # NODE_JS_VERSION -- node js version (defined in test-matrix.yml, a default is hardcoded here)
script_path=$(dirname $(realpath -s $0)) script_path=$(dirname "$(realpath -s "$0")")
source $script_path/functions/imports.sh source "$script_path/functions/imports.sh"
set -euo pipefail set -euo pipefail
NODE_JS_VERSION=${NODE_JS_VERSION-16} NODE_JS_VERSION=${NODE_JS_VERSION-16}
@ -24,18 +24,18 @@ echo -e "\033[1m>>>>> Build docker container >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0
docker build \ docker build \
--file .ci/Dockerfile \ --file .ci/Dockerfile \
--tag elastic/elasticsearch-js \ --tag elastic/elasticsearch-js \
--build-arg NODE_JS_VERSION=${NODE_JS_VERSION} \ --build-arg NODE_JS_VERSION="${NODE_JS_VERSION}" \
. .
echo -e "\033[1m>>>>> NPM run test:integration >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" echo -e "\033[1m>>>>> NPM run test:integration >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
repo=$(realpath $(dirname $(realpath -s $0))/../) repo=$(realpath "$(dirname "$(realpath -s "$0")")"/../)
docker run \ docker run \
--network=${network_name} \ --network="${network_name}" \
--env "TEST_ES_SERVER=${ELASTICSEARCH_URL}" \ --env "TEST_ES_SERVER=${ELASTICSEARCH_URL}" \
--env "TEST_SUITE=${TEST_SUITE}" \ --env "TEST_SUITE=${TEST_SUITE}" \
--volume $repo:/usr/src/app \ --volume "$repo:/usr/src/app" \
--volume /usr/src/app/node_modules \ --volume /usr/src/app/node_modules \
--name elasticsearch-js \ --name elasticsearch-js \
--rm \ --rm \

View File

@ -1,10 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Version 1.1 # Version 1.1
# - Moved to .ci folder and seperated out `run-repository.sh` # - Moved to .ci folder and separated out `run-repository.sh`
# - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products # - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products
script_path=$(dirname $(realpath -s $0)) script_path=$(dirname "$(realpath -s "$0")")
source $script_path/functions/imports.sh source "$script_path/functions/imports.sh"
set -euo pipefail set -euo pipefail
echo -e "\033[1m>>>>> Start [$STACK_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" echo -e "\033[1m>>>>> Start [$STACK_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
@ -15,7 +15,7 @@ if [[ -n "$RUNSCRIPTS" ]]; then
echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
CONTAINER_NAME=${RUNSCRIPT} \ CONTAINER_NAME=${RUNSCRIPT} \
DETACH=true \ DETACH=true \
bash .ci/run-${RUNSCRIPT}.sh bash ".ci/run-${RUNSCRIPT}.sh"
done done
fi fi

View File

@ -6,12 +6,11 @@
"main": "index.js", "main": "index.js",
"types": "index.d.ts", "types": "index.d.ts",
"scripts": { "scripts": {
"test": "npm run build && npm run lint && tap test/{unit,acceptance}/{*,**/*}.test.ts", "test": "npm run build && npm run lint && tap test/unit/{*,**/*}.test.ts",
"test:unit": "npm run build && tap test/unit/{*,**/*}.test.ts", "test:unit": "npm run build && tap test/unit/{*,**/*}.test.ts",
"test:acceptance": "npm run build && tap test/acceptance/*.test.ts", "test:coverage-100": "npm run build && tap test/unit/{*,**/*}.test.ts --coverage --100",
"test:coverage-100": "npm run build && tap test/{unit,acceptance}/{*,**/*}.test.ts --coverage --100", "test:coverage-report": "npm run build && tap test/unit/{*,**/*}.test.ts --coverage && nyc report --reporter=text-lcov > coverage.lcov",
"test:coverage-report": "npm run build && tap test/{unit,acceptance}/{*,**/*}.test.ts --coverage && nyc report --reporter=text-lcov > coverage.lcov", "test:coverage-ui": "npm run build && tap test/unit/{*,**/*}.test.ts --coverage --coverage-report=html",
"test:coverage-ui": "npm run build && tap test/{unit,acceptance}/{*,**/*}.test.ts --coverage --coverage-report=html",
"test:integration": "tsc && node test/integration/index.js", "test:integration": "tsc && node test/integration/index.js",
"lint": "ts-standard src", "lint": "ts-standard src",
"lint:fix": "ts-standard --fix src", "lint:fix": "ts-standard --fix src",
@ -31,10 +30,16 @@
"client", "client",
"index" "index"
], ],
"author": { "contributors": [
"name": "Tomas Della Vedova", {
"company": "Elastic BV" "name": "Tomas Della Vedova",
}, "company": "Elastic BV"
},
{
"name": "Josh Mock",
"company": "Elastic BV"
}
],
"license": "Apache-2.0", "license": "Apache-2.0",
"repository": { "repository": {
"type": "git", "type": "git",