Skip to content

Commit e6a31b2

Browse files
committed
Use released version of OpenSearch 2.12.
Signed-off-by: dblock <[email protected]>
1 parent de1fe44 commit e6a31b2

File tree

1 file changed

+7
-44
lines changed

1 file changed

+7
-44
lines changed

.github/workflows/coverage.yml

+7-44
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,35 @@ name: API Coverage
22

33
on: [push, pull_request]
44

5-
# git clone [email protected]:dblock/OpenSearch.git
6-
# cd OpenSearch
7-
# git remote add upstream [email protected]:opensearch-project/OpenSearch.git
8-
# git fetch upstream --tags
9-
# git checkout 2.11.1
10-
# git checkout -b 2.11.1-api-plugin
11-
# git cherry-pick ffa9ce9d41ac4d8a15b7041b4c8c60c4d3b1cffc
12-
# git push origin 2.11.1-api-plugin
13-
145
env:
156
JAVA_VERSION: 11
16-
OPENSEARCH_VERSION: 2.11.1
7+
OPENSEARCH_VERSION: 2.12.0
8+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: BobgG7YrtsdKf9M
179

1810
jobs:
1911
coverage:
2012
runs-on: ubuntu-latest
2113
steps:
2214
- name: Checkout Repo
2315
uses: actions/checkout@v2
24-
- name: Setup Java
25-
uses: actions/setup-java@v1
26-
with:
27-
java-version: ${{ env.JAVA_VERSION }}
28-
- name: Checkout OpenSearch
29-
uses: actions/checkout@v2
30-
with:
31-
repository: 'opensearch-project/OpenSearch'
32-
path: OpenSearch
33-
ref: ${{ env.OPENSEARCH_VERSION }}
34-
- name: Build OpenSearch
35-
working-directory: ./OpenSearch
36-
run: |
37-
git fetch origin 2.x
38-
git cherry-pick -n c0581a0a3ca37a97bfdffc90f78a7e1b2afd7029 --strategy-option theirs
39-
./gradlew :server:assemble -Dbuild.snapshot=false
40-
./gradlew :libs:opensearch-core:assemble -Dbuild.snapshot=false
41-
./gradlew publishToMavenLocal -Dbuild.snapshot=false
42-
- name: Checkout OpenSearch API Plugin
43-
uses: actions/checkout@v2
44-
with:
45-
repository: 'dblock/opensearch-api'
46-
path: opensearch-api
47-
ref: 2.x
48-
- name: Build API Plugin
49-
working-directory: ./opensearch-api
50-
run: |
51-
./gradlew assemble -Dopensearch.version=${{ env.OPENSEARCH_VERSION }} -Dbuild.snapshot=false
5216
- name: Install API Plugin
5317
run: |
18+
wget https://github.com/dblock/opensearch-api/releases/download/v${{ env.OPENSEARCH_VERSION }}/opensearch-api-${{ env.OPENSEARCH_VERSION }}.0.zip
5419
echo "FROM opensearchproject/opensearch:${{ env.OPENSEARCH_VERSION }}" >> Dockerfile
55-
echo "COPY ./OpenSearch/server/build/distributions/opensearch-${{ env.OPENSEARCH_VERSION }}.jar /usr/share/opensearch/lib/" >> Dockerfile
56-
echo "COPY ./OpenSearch/libs/core/build/distributions/opensearch-core-${{ env.OPENSEARCH_VERSION }}.jar /usr/share/opensearch/lib/" >> Dockerfile
57-
echo "ADD ./opensearch-api/build/distributions/opensearch-api-${{ env.OPENSEARCH_VERSION }}.0.zip /tmp/" >> Dockerfile
20+
echo "ADD ./opensearch-api-${{ env.OPENSEARCH_VERSION }}.0.zip /tmp/" >> Dockerfile
5821
echo "RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/opensearch-api-${{ env.OPENSEARCH_VERSION }}.0.zip" >> Dockerfile
5922
cat Dockerfile
6023
- name: Build and Run Docker Container
6124
run: |
6225
docker build . --tag opensearch-with-api-plugin
63-
docker run --detach -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" opensearch-with-api-plugin
26+
docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e OPENSEARCH_INITIAL_ADMIN_PASSWORD="${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}" opensearch-with-api-plugin
6427
sleep 30
6528
- name: Display OpenSearch Info
6629
run: |
67-
curl -u admin:admin --insecure https://localhost:9200/ | jq
30+
curl -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} --insecure https://localhost:9200/ | jq
6831
- name: Dump and Compare API
6932
run: |
70-
curl -u admin:admin --insecure https://localhost:9200/_plugins/api | jq > OpenSearch.auto.openapi.json
33+
curl -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} --insecure https://localhost:9200/_plugins/api | jq > OpenSearch.auto.openapi.json
7134
docker run --mount type=bind,source=.,target=/specs openapitools/openapi-diff:latest /specs/OpenSearch.openapi.json /specs/OpenSearch.auto.openapi.json --json /specs/diff.json
7235
- name: Show Diff
7336
run: |

0 commit comments

Comments
 (0)