Use Case - PROD #56875
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Use Case - PROD | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '*/15 * * * *' | |
jobs: | |
PROD: | |
environment: PROD | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run use case tests | |
run: | | |
cd test/k6 | |
docker compose run k6 run /src/tests/end2end.js -e subskey=${{ secrets.APIM_SUBSKEY }} -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e userId=${{ secrets.USER_ID }} -e personNumber=${{ secrets.PERSON_NUMBER }} -e partyId=${{ secrets.PARTY_ID }} -e username=${{ secrets.USERNAME }} -e password=${{ secrets.PASSWORD }} | |
report-status: | |
name: Report status | |
runs-on: ubuntu-latest | |
needs: [PROD] | |
if: always() && contains(join(needs.*.result, ','), 'failure') | |
steps: | |
- name: Build failure report | |
run: | | |
report=" :warning: FileScan use case test failure in production :warning: \n" | |
report+="Workflow available here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
echo "stepreport="$report >> $GITHUB_ENV | |
- name: Report failure to Slack | |
id: slack | |
uses: slackapi/slack-github-action@v1.27.0 | |
with: | |
payload: | | |
{ | |
"text": "${{ env.stepreport }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_PROD }} | |