Skip to content

Commit

Permalink
fix: download openapi.json only when modinput tests are to be ran (#171)
Browse files Browse the repository at this point in the history
* fix: download openapi.json only when modinput tests are to be ran

* chore: upload openapi only for ucc-modinput tests
  • Loading branch information
mkolasinski-splunk authored Aug 23, 2023
1 parent d1668bd commit c75e76d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/reusable-build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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') }}
Expand Down

0 comments on commit c75e76d

Please sign in to comment.