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

[Backport 2.x] Onboard jenkins prod docker images on github actions #1764

Merged
merged 1 commit into from
Nov 2, 2023
Merged
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
18 changes: 0 additions & 18 deletions .github/workflows/dco.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@ name: Test and Build OpenSearch Observability Backend Plugin
on: [pull_request, push]

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

build-linux:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [11, 17]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
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:
- uses: actions/checkout@v1
Expand All @@ -19,18 +30,17 @@ jobs:
java-version: ${{ matrix.java }}

- name: Run Backwards Compatibility Tests
# Temporarily only do this for linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
echo "Running backwards compatibility tests ..."
./gradlew bwcTestSuite -Dtests.security.manager=false
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "./gradlew bwcTestSuite -Dtests.security.manager=false"

- name: Build with Gradle
run: |
./gradlew build
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "./gradlew build"

- name: Upload coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
flags: opensearch-observability
Expand All @@ -42,8 +52,40 @@ jobs:
mkdir -p opensearch-observability-builds
cp -r ./build/distributions/*.zip opensearch-observability-builds/

- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: opensearch-observability-ubuntu-latest
path: opensearch-observability-builds

build-windows-macos:
strategy:
# Run all jobs
fail-fast: false
matrix:
java: [11, 17]
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Build with Gradle
run: |
./gradlew build

- name: Create Artifact Path
run: |
mkdir -p opensearch-observability-builds
cp -r ./build/distributions/*.zip opensearch-observability-builds/

- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: opensearch-observability-${{ matrix.os }}
path: opensearch-observability-builds
path: opensearch-observability-builds
Loading