|
| 1 | +name: Security Plugin IT |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches-ignore: |
| 7 | + - 'dependabot/**' |
| 8 | + paths: |
| 9 | + - 'integ-test/**' |
| 10 | + - '.github/workflows/integ-tests-with-security.yml' |
| 11 | + |
| 12 | +jobs: |
| 13 | + Get-CI-Image-Tag: |
| 14 | + uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main |
| 15 | + with: |
| 16 | + product: opensearch |
| 17 | + |
| 18 | + security-it-linux: |
| 19 | + needs: Get-CI-Image-Tag |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + java: [ 21 ] |
| 24 | + env: |
| 25 | + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true |
| 26 | + runs-on: ubuntu-latest |
| 27 | + container: |
| 28 | + # using the same image which is used by opensearch-build team to build the OpenSearch Distribution |
| 29 | + # this image tag is subject to change as more dependencies and updates will arrive over time |
| 30 | + image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} |
| 31 | + # need to switch to root so that github actions can install runner binary on container without permission issues. |
| 32 | + options: --user root |
| 33 | + |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v3 |
| 36 | + |
| 37 | + - name: Set up JDK ${{ matrix.java }} |
| 38 | + uses: actions/setup-java@v3 |
| 39 | + with: |
| 40 | + distribution: 'temurin' |
| 41 | + java-version: ${{ matrix.java }} |
| 42 | + |
| 43 | + - name: Build with Gradle |
| 44 | + run: | |
| 45 | + chown -R 1000:1000 `pwd` |
| 46 | + su `id -un 1000` -c "./gradlew integTestWithSecurity" |
| 47 | +
|
| 48 | + - name: Upload test reports |
| 49 | + if: ${{ always() }} |
| 50 | + uses: actions/upload-artifact@v2 |
| 51 | + continue-on-error: true |
| 52 | + with: |
| 53 | + name: test-reports-${{ matrix.os }}-${{ matrix.java }} |
| 54 | + path: | |
| 55 | + integ-test/build/reports/** |
| 56 | + integ-test/build/testclusters/*/logs/* |
| 57 | + integ-test/build/testclusters/*/config/* |
| 58 | +
|
| 59 | + security-it-windows-macos: |
| 60 | + strategy: |
| 61 | + fail-fast: false |
| 62 | + matrix: |
| 63 | + os: [ windows-latest, macos-13 ] |
| 64 | + java: [ 21 ] |
| 65 | + |
| 66 | + runs-on: ${{ matrix.os }} |
| 67 | + |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@v3 |
| 70 | + |
| 71 | + - name: Set up JDK ${{ matrix.java }} |
| 72 | + uses: actions/setup-java@v3 |
| 73 | + with: |
| 74 | + distribution: 'temurin' |
| 75 | + java-version: ${{ matrix.java }} |
| 76 | + |
| 77 | + - name: Build with Gradle |
| 78 | + run: ./gradlew integTestWithSecurity |
| 79 | + |
| 80 | + - name: Upload test reports |
| 81 | + if: ${{ always() }} |
| 82 | + uses: actions/upload-artifact@v2 |
| 83 | + continue-on-error: true |
| 84 | + with: |
| 85 | + name: test-reports-${{ matrix.os }}-${{ matrix.java }} |
| 86 | + path: | |
| 87 | + integ-test/build/reports/** |
| 88 | + integ-test/build/testclusters/*/logs/* |
| 89 | + integ-test/build/testclusters/*/config/* |
0 commit comments