Skip to content

Commit

Permalink
Add conditional checks for jdk14 and jdk17
Browse files Browse the repository at this point in the history
Signed-off-by: Zelin Hao <[email protected]>
  • Loading branch information
zelinh committed Jul 7, 2022
1 parent fab9436 commit 2b3ef3b
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 7 deletions.
47 changes: 40 additions & 7 deletions .github/workflows/manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,64 @@ on:
push:
pull_request:
paths:
- 'manifests/**/*.yml'
- '!manifests/3.**/**'
- manifests/**/*.yml
schedule:
- cron: 0 0 * * *

jobs:
list-manifests14:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: echo "::set-output name=matrix::$(ls manifests/**/opensearch*.yml | awk -F/ '{if($2<3)print$0}' | jq -R -s -c 'split("\n")[:-1]')"

list-manifests:
list-manifests17:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: echo "::set-output name=matrix::$(ls manifests/**/opensearch*.yml | jq -R -s -c 'split("\n")[:-1]')"
run: echo "::set-output name=matrix::$(ls manifests/**/opensearch*.yml | awk -F/ '{if($2>3)print$0}' | jq -R -s -c 'split("\n")[:-1]')"

check:
needs: list-manifests
manifest-checks-jdk14:
needs: list-manifests14
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.7
JDK_VERSION: 14
strategy:
matrix:
manifest: ${{ fromJson(needs.list-manifests.outputs.matrix) }}
manifest: ${{ fromJson(needs.list-manifests14.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- name: Set Up JDK ${{ env.JDK_VERSION }}
uses: actions/setup-java@v1
with:
java-version: ${{ env.JDK_VERSION }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Pipenv and Dependencies
run: |
python -m pip install --upgrade pipenv wheel
- name: OpenSearch Manifests
run: |-
./ci.sh ${{ matrix.manifest }} --snapshot
manifest-checks-jdk17:
needs: list-manifests17
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.7
JDK_VERSION: 17
strategy:
matrix:
manifest: ${{ fromJson(needs.list-manifests17.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- name: Set Up JDK ${{ env.JDK_VERSION }}
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/manifests_JDK17.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: manifests

on:
push:
pull_request:
paths:
- 'manifests/**/*.yml'
- '!manifests/3.**/**'
schedule:
- cron: 0 0 * * *

jobs:

list-manifests:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: echo "::set-output name=matrix::$(ls manifests/**/opensearch*.yml | jq -R -s -c 'split("\n")[:-1]')"

check:
needs: list-manifests
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.7
JDK_VERSION: 14
strategy:
matrix:
manifest: ${{ fromJson(needs.list-manifests.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- name: Set Up JDK ${{ env.JDK_VERSION }}
uses: actions/setup-java@v1
with:
java-version: ${{ env.JDK_VERSION }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Pipenv and Dependencies
run: |
python -m pip install --upgrade pipenv wheel
- name: OpenSearch Manifests
run: |-
./ci.sh ${{ matrix.manifest }} --snapshot

0 comments on commit 2b3ef3b

Please sign in to comment.