Skip to content

Adjusted env matrix use. #35

Adjusted env matrix use.

Adjusted env matrix use. #35

##
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
##
name: Security Test and Build Notifications
on: [push, pull_request]
jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch
security-test:
needs: Get-CI-Image-Tag
# This job runs on Linux
strategy:
# This setting says that all jobs should finish, even if one fails
fail-fast: false
matrix:
java: [ 21, 23 ]
os:
- ubuntu-24.04-arm # arm64-preview
- ubuntu-24.04 # x64
runs-on: ${{ matrix.os }}
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 }}
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@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: ${{ matrix.java }}
- name: Checkout Notifications
uses: actions/checkout@v4
- name: Security-enabled Notification Tests for OS ${{ matrix.os }} & JDK ${{ matrix.java }}
chown -R 1000:1000 `pwd`
su `id -un 1000` -c "./gradlew integTest -Dsecurity=true -Dhttps=true --tests '*IT'"
- name: Upload failed logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
overwrite: 'true'
path: build/testclusters/integTest-*/logs/*