Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change build workflow to run on production docker image #1080

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
steps:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
distribution: temurin
with:
java-version: ${{ matrix.java }}

Expand All @@ -30,4 +31,4 @@ jobs:
- name: Build and Run Tests
run: |
./gradlew ':test' --tests "org.opensearch.ad.ml.HCADModelPerfTests" -Dtests.seed=2AEBDBBAE75AC5E0 -Dtests.security.manager=false -Dtests.locale=es-CU -Dtests.timezone=Chile/EasterIsland -Dtest.logs=true -Dmodel-benchmark=true
./gradlew integTest --tests "org.opensearch.ad.e2e.SingleStreamModelPerfIT" -Dtests.seed=60CDDB34427ACD0C -Dtests.security.manager=false -Dtests.locale=kab-DZ -Dtests.timezone=Asia/Hebron -Dtest.logs=true -Dmodel-benchmark=true
./gradlew integTest --tests "org.opensearch.ad.e2e.SingleStreamModelPerfIT" -Dtests.seed=60CDDB34427ACD0C -Dtests.security.manager=false -Dtests.locale=kab-DZ -Dtests.timezone=Asia/Hebron -Dtest.logs=true -Dmodel-benchmark=true
65 changes: 59 additions & 6 deletions .github/workflows/test_build_multi_platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,62 @@ on:
- "*"

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch

Build-ad-linux:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [11, 17, 20]
fail-fast: false
name: Build and Test Anomaly detection Plugin
runs-on: ubuntu-latest
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# this image tag is subject to change as more dependencies and updates will arrive over time
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
# need to switch to root so that github actions can install runner binary on container without permission issues.
options: --user root

steps:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}

- name: Checkout AD
uses: actions/checkout@v4

- name: Assemble anomaly-detection
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "whoami && java -version && ./gradlew assemble
- name: Build and Run Tests
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "whoami && java -version && ./gradlew build
- name: Publish to Maven Local
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "whoami && java -version && ./gradlew publishToMavenLocal
- name: Multi Nodes Integration Testing
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "whoami && java -version && ./gradlew integTest -PnumNodes=3
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: plugin

Build-ad-windows:
strategy:
matrix:
java: [ 11, 17, 20 ]
java: [11, 17, 20]
name: Build and Test Anomaly Detection Plugin on Windows
runs-on: windows-latest
env:
Expand All @@ -20,6 +72,7 @@ jobs:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Checkout Anomaly Detection
uses: actions/checkout@v4
Expand All @@ -38,22 +91,22 @@ jobs:
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: plugin
Build-ad:

Build-ad-macos:
strategy:
matrix:
java: [11,17,20]
os: [ubuntu-latest, macos-latest]
java: [11, 17, 20]
fail-fast: false

name: Build and Test Anomaly detection Plugin
runs-on: ${{ matrix.os }}
runs-on: macos-latest
env:
JENKINS_URL: build.ci.opensearch.org

steps:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}

- name: Checkout AD
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_bwc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
Build-ad:
strategy:
matrix:
java: [11,17,20]
java: [11, 17, 20]
fail-fast: false

name: Test Anomaly detection BWC
Expand All @@ -21,6 +21,7 @@ jobs:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}

# anomaly-detection
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
Build-ad:
strategy:
matrix:
java: [11,17,20]
java: [11, 17, 20]
fail-fast: false

name: Security test workflow for Anomaly Detection
Expand All @@ -21,6 +21,7 @@ jobs:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}

# time-series-analytics
Expand Down