Skip to content

Commit

Permalink
Update the JDK version for manifest checks on 3.0.0 (#2301)
Browse files Browse the repository at this point in the history
* Exclude manifest checks for 3.0.0 for now

Signed-off-by: Zelin Hao <[email protected]>

* Add conditional checks for jdk14 and jdk17

Signed-off-by: Zelin Hao <[email protected]>

* Change jdk version

Signed-off-by: Zelin Hao <[email protected]>
  • Loading branch information
zelinh authored Jul 11, 2022
1 parent 5161c14 commit f867925
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions .github/workflows/manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,59 @@ on:
- cron: 0 0 * * *

jobs:
list-manifests11:
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<2)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>2)print$0}' | jq -R -s -c 'split("\n")[:-1]')"

manifest-checks-jdk11:
needs: list-manifests11
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.7
JDK_VERSION: 11
strategy:
matrix:
manifest: ${{ fromJson(needs.list-manifests11.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
check:
needs: list-manifests
manifest-checks-jdk17:
needs: list-manifests17
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.7
JDK_VERSION: 14
JDK_VERSION: 17
strategy:
matrix:
manifest: ${{ fromJson(needs.list-manifests.outputs.matrix) }}
manifest: ${{ fromJson(needs.list-manifests17.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- name: Set Up JDK ${{ env.JDK_VERSION }}
Expand Down

0 comments on commit f867925

Please sign in to comment.