Skip to content

Commit

Permalink
Apply opensearch-build container fix to multi-node-test-workflow (#683)
Browse files Browse the repository at this point in the history
* Apply opensearch-build container fix to multi-node-test-workflow

Signed-off-by: Finn Carroll <[email protected]>

* Forgot to add the actual start commands...

Signed-off-by: Finn Carroll <[email protected]>

* Bump remaining checkout and setup-java GHAs to @v4

Signed-off-by: Finn Carroll <[email protected]>

---------

Signed-off-by: Finn Carroll <[email protected]>
  • Loading branch information
finnegancarroll authored Nov 26, 2024
1 parent 29fc98e commit adba597
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,22 @@ jobs:
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 }} for build and test
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 @@ -76,7 +75,7 @@ jobs:
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 @@ -154,7 +153,7 @@ jobs:
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 @@ -188,7 +187,7 @@ jobs:
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
18 changes: 6 additions & 12 deletions .github/workflows/multi-node-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,30 @@ jobs:
strategy:
matrix:
java: [ 21 ]
# Job name
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

# actions/checkout@v4 and actions/setup-java@v4 use node 20:
# https://github.com/actions/checkout/releases/tag/v4.0.0
# container image does not have GLIBC_2.28 required for this node version
# as such use @v3 actions instead for this workflow and set ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION
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 ${{ 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 }}

# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run integration tests with multi node config
run: |
chown -R 1000:1000 `pwd`
Expand Down

0 comments on commit adba597

Please sign in to comment.