Skip to content

Commit 24f2f92

Browse files
author
Chris Wiechmann
authored
Merge pull request #120 from Axway-API-Builder-Ext/elasticsearch-8
Adding support for Elasticsearch 8
2 parents 9258d6e + ff785d8 commit 24f2f92

File tree

126 files changed

+4419
-5864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+4419
-5864
lines changed

.github/workflows/plugin-fn-elasticsearch.yml

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
paths:
77
- 'api-builder-plugin-fn-elasticsearch/**'
8+
branches:
9+
- 'master'
810
pull_request:
911
paths:
1012
- 'api-builder-plugin-fn-elasticsearch/**'
@@ -17,30 +19,105 @@ defaults:
1719
working-directory: api-builder-plugin-fn-elasticsearch
1820

1921
jobs:
20-
build:
22+
unit-tests:
23+
name: Unit tests
2124
runs-on: ubuntu-latest
2225
strategy:
2326
matrix:
24-
node-version: [10.x, 12.x, 14.x]
27+
node-version: [12.x, 14.x, 16.x]
2528
steps:
2629
- uses: actions/checkout@v1
2730
- name: Use Node.js ${{ matrix.node-version }}
2831
uses: actions/setup-node@v1
2932
with:
3033
node-version: ${{ matrix.node-version }}
31-
- name: npm install, build, and test
34+
- name: Run unit tests
3235
env:
3336
CI: true
3437
run: |
3538
npm ci
3639
npm run build --if-present
37-
npm test
40+
npm run unit-test
41+
42+
integration-tests-es-v8:
43+
name: Integration-tests ES V8
44+
runs-on: ubuntu-latest
45+
needs: unit-tests
46+
47+
services:
48+
elasticsearch8:
49+
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0
50+
ports:
51+
- 9200:9200
52+
- 9300:9300
53+
env:
54+
xpack.security.enabled: false
55+
action.auto_create_index: '-apigw-*,+*'
56+
options: >-
57+
-e "discovery.type=single-node"
58+
-e "xpack.security.enabled=false"
59+
--health-cmd "curl -f http://localhost:9200"
60+
--health-interval 30s
61+
--health-timeout 2s
62+
--health-retries 5
63+
--health-start-period 30s
64+
65+
steps:
66+
- uses: actions/checkout@v1
67+
- name: Use Node.js 14
68+
uses: actions/setup-node@v1
69+
with:
70+
node-version: '14'
71+
- name: Run integration tests
72+
env:
73+
CI: true
74+
ELASTICSEARCH_HOSTS: 'http://localhost:9200'
75+
run: |
76+
npm ci
77+
npm run build --if-present
78+
npm run integration-test
79+
80+
integration-tests-es-v7:
81+
name: Integration-tests ES V7
82+
runs-on: ubuntu-latest
83+
needs: unit-tests
84+
85+
services:
86+
elasticsearch7:
87+
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
88+
ports:
89+
- 9200:9200
90+
- 9300:9300
91+
env:
92+
xpack.security.enabled: false
93+
action.auto_create_index: '-apigw-*,+*'
94+
options: >-
95+
-e "discovery.type=single-node"
96+
--health-cmd "curl -f http://localhost:9200"
97+
--health-interval 30s
98+
--health-timeout 2s
99+
--health-retries 5
100+
--health-start-period 30s
101+
steps:
102+
- uses: actions/checkout@v1
103+
- name: Use Node.js 14
104+
uses: actions/setup-node@v1
105+
with:
106+
node-version: '14'
107+
- name: Run integration tests
108+
env:
109+
CI: true
110+
ELASTICSEARCH_HOSTS: 'http://localhost:9200'
111+
run: |
112+
npm ci
113+
npm run build --if-present
114+
npm run integration-test
38115
39116
publish-gpr:
40117
if: contains(github.event.release.tag_name, 'plugin-fn-elasticsearch')
41118
env:
42119
CI: true
43-
needs: build
120+
needs: [integration-tests-es-v7, integration-tests-es-v8]
44121
runs-on: ubuntu-latest
45122
steps:
46123
- uses: actions/checkout@v1
@@ -59,7 +136,7 @@ jobs:
59136
publish-npm:
60137
env:
61138
CI: true
62-
needs: [build, publish-gpr]
139+
needs: [integration-tests-es-v7, publish-gpr]
63140
runs-on: ubuntu-latest
64141
steps:
65142
- uses: actions/checkout@v1
@@ -73,4 +150,4 @@ jobs:
73150
run: |
74151
npm ci
75152
echo "//registry.npmjs.org/:_authToken=${{ secrets.npm_token }}" > ~/.npmrc
76-
npm publish --access public
153+
npm publish --access public

api-builder-plugin-fn-elasticsearch/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [3.0.0] 2022-02-28
8+
### Security
9+
- Updated @elastic/elasticsearch to version 8.0.0 to add support for Elasticsearch 8
10+
711
## [2.1.2] 2022-02-02
812
### Security
913
- Updated API-Builder runtime to solve security issue

0 commit comments

Comments
 (0)