Skip to content

Commit

Permalink
Fix null value_file judgment (opea-project#1470)
Browse files Browse the repository at this point in the history
Signed-off-by: ZePan110 <[email protected]>
Co-authored-by: Malini Bhandaru <[email protected]>
  • Loading branch information
ZePan110 and mkbhanda authored Feb 6, 2025
1 parent 388d3eb commit 44a689b
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/_get-image-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ jobs:
echo "print image list..."
echo "$image_list" | jq . | jq -r '.[]'
echo "end of image list..."
echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT
# echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT
echo "matrix=$(echo "" | jq -c '.')" >> $GITHUB_OUTPUT
1 change: 1 addition & 0 deletions .github/workflows/_helm-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
helm-test:
needs: [get-test-case]
if: ${{ fromJSON(needs.get-test-case.outputs.value_files).length != 0 }}
strategy:
matrix:
value_file: ${{ fromJSON(needs.get-test-case.outputs.value_files) }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_run-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
compose-test:
needs: [get-test-case]
if: ${{ fromJSON(needs.get-test-case.outputs.test_cases).length != 0 }}
strategy:
matrix:
test_case: ${{ fromJSON(needs.get-test-case.outputs.test_cases) }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:

publish:
needs: [get-image-list]
if: ${{ fromJSON(needs.get-image-list.outputs.matrix).length != 0 }}
strategy:
matrix:
image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual-docker-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
scan-docker:
needs: get-image-list
runs-on: "docker-build-${{ inputs.node }}"
if: ${{ fromJSON(needs.get-image-list.outputs.matrix).length != 0 }}
strategy:
matrix:
image: ${{ fromJson(needs.get-image-list.outputs.matrix) }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual-example-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
build-deploy-gmc:
needs: [get-test-matrix]
if: ${{ fromJSON(inputs.deploy_gmc) }}
if: ${{ fromJSON(inputs.deploy_gmc) }} && ${{ fromJSON(needs.get-test-matrix.outputs.nodes).length != 0 }}
strategy:
matrix:
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
Expand All @@ -90,7 +90,7 @@ jobs:

run-examples:
needs: [get-test-matrix, build-deploy-gmc]
if: always()
if: always() && ${{ fromJSON(needs.get-test-matrix.outputs.examples).length != 0 }}
strategy:
matrix:
example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
image-build:
needs: get-test-matrix
if: ${{ fromJSON(needs.get-test-matrix.outputs.nodes).length != 0 }}
strategy:
matrix:
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual-reset-local-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
clean-up:
needs: get-build-matrix
if: ${{ fromJSON(needs.get-build-matrix.outputs.nodes).length != 0 }}
strategy:
matrix:
node: ${{ fromJson(needs.get-build-matrix.outputs.nodes) }}
Expand All @@ -47,6 +48,7 @@ jobs:
build:
needs: [get-build-matrix, clean-up]
if: ${{ fromJSON(needs.get-build-matrix.outputs.nodes).length != 0 }}
strategy:
matrix:
example: ${{ fromJson(needs.get-build-matrix.outputs.examples) }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly-docker-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_dispatch:

env:
EXAMPLES: ${{ vars.NIGHTLY_RELEASE_EXAMPLES }}
EXAMPLES: "" #${{ vars.NIGHTLY_RELEASE_EXAMPLES }}
TAG: "latest"
PUBLISH_TAGS: "latest"

Expand All @@ -34,6 +34,7 @@ jobs:
build-and-test:
needs: get-build-matrix
if: ${{ fromJSON(needs.get-build-matrix.outputs.examples_json).length != 0 }}
strategy:
matrix:
example: ${{ fromJSON(needs.get-build-matrix.outputs.examples_json) }}
Expand All @@ -53,6 +54,7 @@ jobs:

publish:
needs: [get-build-matrix, get-image-list, build-and-test]
if: ${{ fromJSON(needs.get-image-list.outputs.matrix).length != 0 }}
strategy:
matrix:
image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-chart-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
helm-chart-test:
needs: [job1]
if: always() && ${{ needs.job1.outputs.run_matrix.example.length > 0 }}
if: always() && ${{ fromJSON(needs.job1.outputs.run_matrix).length != 0 }}
uses: ./.github/workflows/_helm-e2e.yml
strategy:
matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-docker-compose-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ jobs:
if: ${{ !github.event.pull_request.draft }}
uses: ./.github/workflows/_get-test-matrix.yml
with:
diff_excluded_files: '\.github|\.md|\.txt|kubernetes|gmc|assets|benchmark'
diff_excluded_files: '\.md|\.txt|kubernetes|gmc|assets|benchmark' #\.github|

example-test:
needs: [get-test-matrix]
if: ${{ fromJSON(needs.get-test-matrix.outputs.run_matrix).length != 0 }}
strategy:
matrix: ${{ fromJSON(needs.get-test-matrix.outputs.run_matrix) }}
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:

image-build:
needs: job1
if: ${{ fromJSON(needs.job1.outputs.run_matrix).length != 0 }}
strategy:
matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
fail-fast: false
Expand Down

0 comments on commit 44a689b

Please sign in to comment.