Use Case - PROD #30302
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: | |
usecase-test: | |
environment: PROD | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run use case tests for endpoint 'applications' | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/applications.js | |
flags: -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} | |
- name: Run use case tests for endpoint 'instances' | |
if: always() | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/instances.js | |
flags: -e env=${{ vars.ENV }} -e pid=${{ secrets.PERSON_NUMBER }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e userName=${{ secrets.USE_CASE_USER_NAME}} -e userPassword=${{ secrets.USE_CASE_USER_PASSWORD}} -e apimSubsKey=${{ secrets.APIM_SUBSKEY }} -e mpClientId=${{ secrets.MP_CLIENT_ID }} -e mpKid=${{ secrets.MP_KID }} -e encodedJwk=${{ secrets.MP_ENCODEDJWK }} | |
- name: Run use case tests for endpoint 'instances/sbl' | |
if: always() | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/messageboxinstances.js | |
flags: -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e userName=${{ secrets.USE_CASE_USER_NAME}} -e userPassword=${{ secrets.USE_CASE_USER_PASSWORD}} -e apimSubsKey=${{ secrets.APIM_SUBSKEY }} -e apimSblSubsKey=${{ secrets.APIM_SBL_SUBSKEY }} | |
- name: Run use case tests for endpoint 'data' | |
if: always() | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/data.js | |
flags: -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e userName=${{ secrets.USE_CASE_USER_NAME}} -e userPassword=${{ secrets.USE_CASE_USER_PASSWORD}} -e apimSubsKey=${{ secrets.APIM_SUBSKEY }} | |
- name: Run use case tests for endpoint 'process' | |
if: always() | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/process.js | |
flags: -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e userName=${{ secrets.USE_CASE_USER_NAME}} -e userPassword=${{ secrets.USE_CASE_USER_PASSWORD}} -e apimSubsKey=${{ secrets.APIM_SUBSKEY }} | |
- name: Run use case tests for endpoint 'sign' | |
if: always() | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/sign.js | |
flags: -e env=${{ vars.ENV }} -e userName=${{ secrets.USE_CASE_USER_NAME}} -e userPassword=${{ secrets.USE_CASE_USER_PASSWORD}} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e apimSubsKey=${{ secrets.APIM_SUBSKEY }} | |
- name: Run use case tests for endpoint 'texts' | |
if: always() | |
uses: grafana/[email protected] | |
with: | |
filename: test/k6/src/tests/texts.js | |
flags: -e env=${{ vars.ENV }} -e org=${{ vars.ORG }} -e app=${{ vars.APP }} -e apimSubsKey=${{ secrets.APIM_SUBSKEY }} -e mpClientId=${{ secrets.MP_CLIENT_ID }} -e mpKid=${{ secrets.MP_KID }} -e encodedJwk=${{ secrets.MP_ENCODEDJWK }} | |
- name: Build failure report | |
if: failure() | |
run: | | |
report=":warning: Storage use case test failure in production :warning: \n" | |
report+="\n Workflow available here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
echo "stepreport="$report >> $GITHUB_ENV | |
- name: Report failure to Slack | |
if: failure() | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"text": "${{ env.stepreport }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_PROD }} | |