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.19] Backport github action updates #701

Merged
merged 1 commit into from
Feb 4, 2025
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
8 changes: 6 additions & 2 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write

env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/github-app-token@v1.5.0
uses: tibdex/github-app-token@v2.1.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1
with:
github_token: ${{ steps.github_app_token.outputs.token }}
Expand Down
49 changes: 27 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,30 @@ jobs:
product: opensearch

linux-build:
needs: Get-CI-Image-Tag
strategy:
matrix:
java:
- 11
- 17
- 21
java: [ 21 ]
needs: Get-CI-Image-Tag
# Job name
name: Linux - Build Asynchronous Search
# This job runs on Linux.
outputs:
build-test-linux: ${{ steps.step-build-test-linux.outputs.build-test-linux }}
# This job runs on Linux.
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: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}

steps:
- name: Run start commands
run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
- name: Set up JDK ${{ matrix.java }} for build and test
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.java }}
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
Expand All @@ -56,7 +53,7 @@ jobs:
mv -v build/distributions/$plugin ./
echo "build-test-linux=$plugin" >> $GITHUB_OUTPUT
- name: Uploads coverage
uses: codecov/codecov-action@v1.2.1
uses: codecov/codecov-action@v5.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/upload-artifact@v4
Expand All @@ -66,21 +63,19 @@ jobs:
if-no-files-found: error

linux-test-docker:
needs: linux-build
strategy:
matrix:
java:
- 11
- 17
- 21
java: [ 21 ]
needs: linux-build
# Job name
name: Test Asynchronous Search with opensearchstaging docker
# This job runs on Linux.
runs-on: ubuntu-latest

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.java }}
Expand Down Expand Up @@ -147,16 +142,21 @@ jobs:
path: build/testclusters/integTest-*/logs/*

windows-build:
strategy:
matrix:
java: [ 21 ]
# Job name
name: Windows - Build Asynchronous Search
# This job runs on Windows.
runs-on: windows-latest

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 11
uses: actions/setup-java@v1
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.java }}
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v4
Expand All @@ -176,16 +176,21 @@ jobs:
path: asynchronous-search-artifacts

mac-os-build:
strategy:
matrix:
java: [ 21 ]
# Job name
name: MacOS - Build Asynchronous Search
# This job runs on Mac OS.
runs-on: macos-latest

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 11
uses: actions/setup-java@v1
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.java }}
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v4
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,23 @@ on:

jobs:
build-and-publish-snapshots:
strategy:
matrix:
java: [ 21 ]

runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

steps:
- uses: actions/setup-java@v3
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 11
- uses: actions/checkout@v3
java-version: ${{ matrix.java }}
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/multi-node-test-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Multi node test workflow

env:
java_version: 11
# This workflow is triggered on pull requests to master
on:
pull_request:
Expand All @@ -18,30 +16,33 @@ jobs:
product: opensearch

build:
# Job name
strategy:
matrix:
java: [ 21 ]
needs: Get-CI-Image-Tag
# Job name
name: Build Asynchronous Search
# This job runs on Linux
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

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}

steps:
- name: Run start commands
run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 11
uses: actions/setup-java@v1
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.java_version }}
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.java }}

# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run integration tests with multi node config
run: |
chown -R 1000:1000 `pwd`
Expand All @@ -52,7 +53,7 @@ jobs:
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "./gradlew bwcTestSuite -Dtests.security.manager=false"
- name: Upload failed logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@ jobs:
build:
strategy:
matrix:
java: [11,17,21]
java: [21]
# Job name
name: Build Asynchronous Search with JDK ${{ matrix.java }}
# This job runs on Linux
runs-on: ubuntu-latest

steps:
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
uses: actions/checkout@v4
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.java }}

# Building zip, deb and rpm files
Expand Down Expand Up @@ -116,7 +118,7 @@ jobs:
asset_content_type: application/zip

- name: Upload Workflow Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: asynchronous-search-plugin
path: asynchronous-search-artifacts
Loading