Skip to content

[AUTO] Increment version to 1.3.16-SNAPSHOT #5140

[AUTO] Increment version to 1.3.16-SNAPSHOT

[AUTO] Increment version to 1.3.16-SNAPSHOT #5140

Workflow file for this run

name: Build and Test ml-commons
# This workflow is triggered on pull requests and push to any branches
on:
pull_request:
branches:
- "*"
push:
branches:
- "*"
jobs:
Build-ml:
strategy:
matrix:
java: [8, 11, 14]
name: Build and Test MLCommons Plugin
runs-on: ubuntu-latest
steps:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
# ml-commons
- name: Checkout MLCommons
uses: actions/checkout@v2
- name: Build and Run Tests
run: |
./gradlew build
- name: Publish to Maven Local
run: |
./gradlew publishToMavenLocal
- name: Multi Nodes Integration Testing
run: |
./gradlew integTest -PnumNodes=3
- name: Pull and Run Docker
run: |
plugin=`ls plugin/build/distributions/*.zip`
echo MLCommons plugin $plugin
version=1.3.16
plugin_version=1.3.16.0-SNAPSHOT
echo Using OpenSearch $version with MLCommons $plugin_version
cd ..
if docker pull opensearchstaging/opensearch:$version
then
echo "FROM opensearchstaging/opensearch:$version" >> Dockerfile
echo "RUN if [ -d /usr/share/opensearch/plugins/opensearch-ml ]; then /usr/share/opensearch/bin/opensearch-plugin remove opensearch-ml; fi" >> Dockerfile
echo "ADD ml-commons/plugin/build/distributions/opensearch-ml-$plugin_version.zip /tmp/" >> Dockerfile
echo "RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:/tmp/opensearch-ml-$plugin_version.zip" >> Dockerfile
docker build -t opensearch-ml:test .
echo "imagePresent=true" >> $GITHUB_ENV
else
echo "imagePresent=false" >> $GITHUB_ENV
fi
- name: Run Docker Image
if: env.imagePresent == 'true'
run: |
cd ..
docker run -p 9200:9200 -d -p 9600:9600 -e "discovery.type=single-node" opensearch-ml:test
sleep 90
- name: Run MLCommons Test
if: env.imagePresent == 'true'
run: |
security=`curl -XGET https://localhost:9200/_cat/plugins?v -u admin:admin --insecure |grep opensearch-security|wc -l`
if [ $security -gt 0 ]
then
echo "Security plugin is available"
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin
else
echo "Security plugin is NOT available"
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster"
fi
- name: Upload Coverage Report
uses: codecov/codecov-action@v1
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: plugin
Build-ml-windows:
strategy:
matrix:
java: [8, 11, 14]
name: Build and Test MLCommons Plugin on Windows
runs-on: windows-latest
steps:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
# ml-commons
- name: Checkout MLCommons
uses: actions/checkout@v2
- name: Build and Run Tests
run: |
./gradlew.bat build
- name: Publish to Maven Local
run: |
./gradlew publishToMavenLocal