From c75e76d335711683c7d8e374cd5b21e1f95b7a1a Mon Sep 17 00:00:00 2001 From: mkolasinski-splunk <105011638+mkolasinski-splunk@users.noreply.github.com> Date: Wed, 23 Aug 2023 11:24:45 +0200 Subject: [PATCH] fix: download openapi.json only when modinput tests are to be ran (#171) * fix: download openapi.json only when modinput tests are to be ran * chore: upload openapi only for ucc-modinput tests --- .github/workflows/reusable-build-test-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 3838c596..dec1e51a 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -604,7 +604,7 @@ jobs: with: name: artifact-openapi path: ${{ github.workspace }}/${{ steps.uccgen.outputs.OUTPUT }}/static/openapi.json - if: ${{ !cancelled() }} + if: ${{ !cancelled() && needs.test-inventory.outputs.ucc_modinput_functional == 'true' && needs.test-inventory.outputs.modinput_functional == 'true' }} - name: artifact-splunk-base uses: actions/upload-artifact@v3 with: @@ -974,7 +974,7 @@ jobs: echo "k8s-manifests-branch=main" } >> "$GITHUB_OUTPUT" - uses: actions/download-artifact@v3 - if: ${{ needs.test-inventory.outputs.ucc_modinput_functional == 'true' }} + if: ${{ needs.test-inventory.outputs.ucc_modinput_functional == 'true' && needs.test-inventory.outputs.modinput_functional == 'true'}} id: download-openapi with: name: artifact-openapi @@ -1004,7 +1004,7 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: | swagger_name=swagger_$(basename "$BUILD_NAME" .spl) - aws s3 sync "${{ github.workspace }}/tmp/restapi_client/" "s3://ta-production-artifacts/ta-apps/$swagger_name/" --exclude "*" --include "README.md" --include "*swagger_client*" --only-show-errors + aws s3 sync "${{ steps.download-openapi.outputs.download-path }}/tmp/restapi_client/" "s3://ta-production-artifacts/ta-apps/$swagger_name/" --exclude "*" --include "README.md" --include "*swagger_client*" --only-show-errors run-knowledge-tests: if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.knowledge == 'true' && (needs.setup-workflow.outputs.execute-ko == 'Yes' || needs.setup-workflow.outputs.execute-knowledge-labeled == 'true') }}