Skip to content

Commit 698518f

Browse files
committed
CI: Update the Jenkins configuration
Use the `STACK_VERSION` environment variable defined in the `master` branch.
1 parent ff6b9cd commit 698518f

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.jenkins/jobs/defaults.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
- axis:
4747
type: yaml
4848
filename: .jenkins/test-matrix.yml
49-
name: ELASTICSEARCH_VERSION
49+
name: STACK_VERSION
5050
- axis:
5151
type: yaml
5252
filename: .jenkins/test-matrix.yml

.jenkins/run-tests

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ if [[ ($branch_specifier == "refs/heads/xpack" && $TEST_SUITE == "core") ]]; the
1919
fi
2020

2121
if [[ $TEST_SUITE == "core" ]]; then
22-
elasticsearch_image=elasticsearch-oss:$ELASTICSEARCH_VERSION
22+
elasticsearch_image=elasticsearch-oss:$STACK_VERSION
2323
elasticsearch_url=http://es1:9200
2424
fi
2525

2626
if [[ $TEST_SUITE == "xpack" ]]; then
27-
elasticsearch_image=elasticsearch:$ELASTICSEARCH_VERSION
27+
elasticsearch_image=elasticsearch:$STACK_VERSION
2828
elasticsearch_url=https://elastic:elastic@es1:9200
2929
fi
3030

@@ -47,6 +47,7 @@ docker build --file Dockerfile --tag elastic/go-elasticsearch .
4747
(make cluster detach=true version=$elasticsearch_image)
4848

4949
# Store the Elasticsearch version and build hash
50+
ELASTICSEARCH_VERSION="$STACK_VERSION"
5051
ELASTICSEARCH_BUILD_VERSION=$(docker run --network elasticsearch --rm appropriate/curl -sSk $elasticsearch_url | docker run -i --rm stedolan/jq -r '.version.number')
5152
ELASTICSEARCH_BUILD_HASH=$(docker run --network elasticsearch --rm appropriate/curl -sSk $elasticsearch_url | docker run -i --rm stedolan/jq -r '.version.build_hash')
5253

@@ -84,14 +85,14 @@ docker run \
8485
status=100
8586
case $TEST_SUITE in
8687
"core" )
87-
if bash .jenkins/tests-core.sh; then
88+
if ELASTICSEARCH_VERSION="$ELASTICSEARCH_VERSION" bash .jenkins/tests-core.sh; then
8889
status=$?
8990
else
9091
status=$?
9192
fi
9293
;;
9394
"xpack" )
94-
if bash .jenkins/tests-xpack.sh; then
95+
if ELASTICSEARCH_VERSION="$ELASTICSEARCH_VERSION" bash .jenkins/tests-xpack.sh; then
9596
status=$?
9697
else
9798
status=$?

.jenkins/test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22

3-
ELASTICSEARCH_VERSION:
3+
STACK_VERSION:
44
- 7.x-SNAPSHOT
55

66
GO_VERSION:

0 commit comments

Comments
 (0)