Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions .github/workflows/optional-spec-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,25 @@ jobs:
make convert_to_collection
npx -- @stoplight/spectral-cli@"${SPECTRAL_VERSION}" lint ./tmp/collection.json --ruleset=./validation/spectral.yaml
popd
- name: Checkout .github folder from main branch
if: ${{ failure() }}
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: main
sparse-checkout: |
.github/workflows
- name: Create Issue - Postman validation Failed
if: ${{ failure() && steps.spectral-validation.outcome == 'failure' }}
uses: ./.github/workflows/task-failure-handler.yml
with:
env: ${{ inputs.env }}
task_name: 'Optional Postman validation'
team_id: ${{ vars.JIRA_TEAM_ID_APIX_PLATFORM }}
- name: Create Issue - IPA validation Failed
if: ${{ failure() && steps.ipa-spectral-validation.outcome == 'failure'}}
uses: ./.github/workflows/task-failure-handler.yml
with:
env: ${{ inputs.env }}
task_name: 'Optional IPA validation'
team_id: ${{ vars.JIRA_TEAM_ID_APIX_PLATFORM }}

retry-handler:
needs: [ optional-validations ]
if: ${{ always() && contains(needs.*.result, 'failure') && fromJSON(github.run_attempt) < 3}}
runs-on: ubuntu-latest
steps:
- env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.api_bot_pat }}
run: gh workflow run retry-handler.yml -F run_id=${{ github.run_id }}

failure-handler:
name: Failure Handler
needs: [ optional-validations, retry-handler ]
if: ${{ always() && contains(needs.*.result, 'failure') && needs.retry-handler.result == 'skipped' }}
uses: ./.github/workflows/failure-handler.yml
with:
env: ${{ inputs.env }}
release_name: "Optional OpenAPI Validation"
team_id: ${{ vars.JIRA_TEAM_ID_APIX_PLATFORM }}
secrets:
jira_api_token: ${{ secrets.JIRA_API_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/required-spec-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
secrets: # all secrets are passed explicitly in this workflow
api_bot_pat:
required: true

permissions:
contents: write

Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/task-failure-handler.yml

This file was deleted.

Loading