Skip to content

Commit 996f818

Browse files
authored
CI updates (#1835
* Add jobs for testing missing 8.x branches * Drop references to acceptance tests They were removed in 1a22745 * Add myself as a contributor :sunglasses: * Clean up shellcheck warnings
1 parent ce37b0f commit 996f818

8 files changed

+99
-19
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
- job:
3+
name: elastic+elasticsearch-js+8.3
4+
display-name: 'elastic / elasticsearch-js # 8.3'
5+
description: Testing the elasticsearch-js 8.3 branch.
6+
junit_results: "*-junit.xml"
7+
parameters:
8+
- string:
9+
name: branch_specifier
10+
default: refs/heads/8.3
11+
description: the Git branch specifier to build (<branchName>, <tagName>,
12+
<commitId>, etc.)
13+
triggers:
14+
- github
15+
- timed: 'H */12 * * *'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
- job:
3+
name: elastic+elasticsearch-js+8.4
4+
display-name: 'elastic / elasticsearch-js # 8.3'
5+
description: Testing the elasticsearch-js 8.4 branch.
6+
junit_results: "*-junit.xml"
7+
parameters:
8+
- string:
9+
name: branch_specifier
10+
default: refs/heads/8.4
11+
description: the Git branch specifier to build (<branchName>, <tagName>,
12+
<commitId>, etc.)
13+
triggers:
14+
- github
15+
- timed: 'H */12 * * *'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
- job:
3+
name: elastic+elasticsearch-js+8.5
4+
display-name: 'elastic / elasticsearch-js # 8.5'
5+
description: Testing the elasticsearch-js 8.5 branch.
6+
junit_results: "*-junit.xml"
7+
parameters:
8+
- string:
9+
name: branch_specifier
10+
default: refs/heads/8.5
11+
description: the Git branch specifier to build (<branchName>, <tagName>,
12+
<commitId>, etc.)
13+
triggers:
14+
- github
15+
- timed: 'H */12 * * *'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
- job:
3+
name: elastic+elasticsearch-js+8.6
4+
display-name: 'elastic / elasticsearch-js # 8.6'
5+
description: Testing the elasticsearch-js 8.6 branch.
6+
junit_results: "*-junit.xml"
7+
parameters:
8+
- string:
9+
name: branch_specifier
10+
default: refs/heads/8.6
11+
description: the Git branch specifier to build (<branchName>, <tagName>,
12+
<commitId>, etc.)
13+
triggers:
14+
- github
15+
- timed: 'H */12 * * *'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
- job:
3+
name: elastic+elasticsearch-js+8.7
4+
display-name: 'elastic / elasticsearch-js # 8.7'
5+
description: Testing the elasticsearch-js 8.7 branch.
6+
junit_results: "*-junit.xml"
7+
parameters:
8+
- string:
9+
name: branch_specifier
10+
default: refs/heads/8.7
11+
description: the Git branch specifier to build (<branchName>, <tagName>,
12+
<commitId>, etc.)
13+
triggers:
14+
- github
15+
- timed: 'H */12 * * *'

.ci/run-repository.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# TEST_SUITE -- which test suite to run: free or platinum
66
# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable, a default is composed based on STACK_VERSION and TEST_SUITE
77
# NODE_JS_VERSION -- node js version (defined in test-matrix.yml, a default is hardcoded here)
8-
script_path=$(dirname $(realpath -s $0))
9-
source $script_path/functions/imports.sh
8+
script_path=$(dirname "$(realpath -s "$0")")
9+
source "$script_path/functions/imports.sh"
1010
set -euo pipefail
1111

1212
NODE_JS_VERSION=${NODE_JS_VERSION-16}
@@ -24,18 +24,18 @@ echo -e "\033[1m>>>>> Build docker container >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0
2424
docker build \
2525
--file .ci/Dockerfile \
2626
--tag elastic/elasticsearch-js \
27-
--build-arg NODE_JS_VERSION=${NODE_JS_VERSION} \
27+
--build-arg NODE_JS_VERSION="${NODE_JS_VERSION}" \
2828
.
2929

3030
echo -e "\033[1m>>>>> NPM run test:integration >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
3131

32-
repo=$(realpath $(dirname $(realpath -s $0))/../)
32+
repo=$(realpath "$(dirname "$(realpath -s "$0")")"/../)
3333

3434
docker run \
35-
--network=${network_name} \
35+
--network="${network_name}" \
3636
--env "TEST_ES_SERVER=${ELASTICSEARCH_URL}" \
3737
--env "TEST_SUITE=${TEST_SUITE}" \
38-
--volume $repo:/usr/src/app \
38+
--volume "$repo:/usr/src/app" \
3939
--volume /usr/src/app/node_modules \
4040
--name elasticsearch-js \
4141
--rm \

.ci/run-tests

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22
#
33
# Version 1.1
4-
# - Moved to .ci folder and seperated out `run-repository.sh`
4+
# - Moved to .ci folder and separated out `run-repository.sh`
55
# - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products
6-
script_path=$(dirname $(realpath -s $0))
7-
source $script_path/functions/imports.sh
6+
script_path=$(dirname "$(realpath -s "$0")")
7+
source "$script_path/functions/imports.sh"
88
set -euo pipefail
99

1010
echo -e "\033[1m>>>>> Start [$STACK_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
@@ -15,7 +15,7 @@ if [[ -n "$RUNSCRIPTS" ]]; then
1515
echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
1616
CONTAINER_NAME=${RUNSCRIPT} \
1717
DETACH=true \
18-
bash .ci/run-${RUNSCRIPT}.sh
18+
bash ".ci/run-${RUNSCRIPT}.sh"
1919
done
2020
fi
2121

package.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
"main": "index.js",
77
"types": "index.d.ts",
88
"scripts": {
9-
"test": "npm run build && npm run lint && tap test/{unit,acceptance}/{*,**/*}.test.ts",
9+
"test": "npm run build && npm run lint && tap test/unit/{*,**/*}.test.ts",
1010
"test:unit": "npm run build && tap test/unit/{*,**/*}.test.ts",
11-
"test:acceptance": "npm run build && tap test/acceptance/*.test.ts",
12-
"test:coverage-100": "npm run build && tap test/{unit,acceptance}/{*,**/*}.test.ts --coverage --100",
13-
"test:coverage-report": "npm run build && tap test/{unit,acceptance}/{*,**/*}.test.ts --coverage && nyc report --reporter=text-lcov > coverage.lcov",
14-
"test:coverage-ui": "npm run build && tap test/{unit,acceptance}/{*,**/*}.test.ts --coverage --coverage-report=html",
11+
"test:coverage-100": "npm run build && tap test/unit/{*,**/*}.test.ts --coverage --100",
12+
"test:coverage-report": "npm run build && tap test/unit/{*,**/*}.test.ts --coverage && nyc report --reporter=text-lcov > coverage.lcov",
13+
"test:coverage-ui": "npm run build && tap test/unit/{*,**/*}.test.ts --coverage --coverage-report=html",
1514
"test:integration": "tsc && node test/integration/index.js",
1615
"lint": "ts-standard src",
1716
"lint:fix": "ts-standard --fix src",
@@ -31,10 +30,16 @@
3130
"client",
3231
"index"
3332
],
34-
"author": {
35-
"name": "Tomas Della Vedova",
36-
"company": "Elastic BV"
37-
},
33+
"contributors": [
34+
{
35+
"name": "Tomas Della Vedova",
36+
"company": "Elastic BV"
37+
},
38+
{
39+
"name": "Josh Mock",
40+
"company": "Elastic BV"
41+
}
42+
],
3843
"license": "Apache-2.0",
3944
"repository": {
4045
"type": "git",

0 commit comments

Comments
 (0)