Skip to content

Commit

Permalink
Use released version of OpenSearch 2.12.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Feb 29, 2024
1 parent de1fe44 commit eec5455
Showing 1 changed file with 4 additions and 42 deletions.
46 changes: 4 additions & 42 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,27 @@ name: API Coverage

on: [push, pull_request]

# git clone git@github.com:dblock/OpenSearch.git
# cd OpenSearch
# git remote add upstream git@github.com:opensearch-project/OpenSearch.git
# git fetch upstream --tags
# git checkout 2.11.1
# git checkout -b 2.11.1-api-plugin
# git cherry-pick ffa9ce9d41ac4d8a15b7041b4c8c60c4d3b1cffc
# git push origin 2.11.1-api-plugin

env:
JAVA_VERSION: 11
OPENSEARCH_VERSION: 2.11.1
OPENSEARCH_VERSION: 2.12.0

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Checkout OpenSearch
uses: actions/checkout@v2
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: ${{ env.OPENSEARCH_VERSION }}
- name: Build OpenSearch
working-directory: ./OpenSearch
run: |
git fetch origin 2.x
git cherry-pick -n c0581a0a3ca37a97bfdffc90f78a7e1b2afd7029 --strategy-option theirs
./gradlew :server:assemble -Dbuild.snapshot=false
./gradlew :libs:opensearch-core:assemble -Dbuild.snapshot=false
./gradlew publishToMavenLocal -Dbuild.snapshot=false
- name: Checkout OpenSearch API Plugin
uses: actions/checkout@v2
with:
repository: 'dblock/opensearch-api'
path: opensearch-api
ref: 2.x
- name: Build API Plugin
working-directory: ./opensearch-api
run: |
./gradlew assemble -Dopensearch.version=${{ env.OPENSEARCH_VERSION }} -Dbuild.snapshot=false
- name: Install API Plugin
run: |
wget https://github.com/dblock/opensearch-api/releases/download/v${{ env.OPENSEARCH_VERSION }}/opensearch-api-${{ env.OPENSEARCH_VERSION }}.0.zip
echo "FROM opensearchproject/opensearch:${{ env.OPENSEARCH_VERSION }}" >> Dockerfile
echo "COPY ./OpenSearch/server/build/distributions/opensearch-${{ env.OPENSEARCH_VERSION }}.jar /usr/share/opensearch/lib/" >> Dockerfile
echo "COPY ./OpenSearch/libs/core/build/distributions/opensearch-core-${{ env.OPENSEARCH_VERSION }}.jar /usr/share/opensearch/lib/" >> Dockerfile
echo "ADD ./opensearch-api/build/distributions/opensearch-api-${{ env.OPENSEARCH_VERSION }}.0.zip /tmp/" >> Dockerfile
echo "ADD ./opensearch-api-${{ env.OPENSEARCH_VERSION }}.0.zip /tmp/" >> Dockerfile
echo "RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/opensearch-api-${{ env.OPENSEARCH_VERSION }}.0.zip" >> Dockerfile
cat Dockerfile
- name: Build and Run Docker Container
run: |
docker build . --tag opensearch-with-api-plugin
docker run --detach -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" opensearch-with-api-plugin
docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e OPENSEARCH_INITIAL_ADMIN_PASSWORD="BobgG7YrtsdKf9M" opensearch-with-api-plugin
sleep 30
- name: Display OpenSearch Info
run: |
Expand Down

0 comments on commit eec5455

Please sign in to comment.