Skip to content

[MIM-1947] Mim 1947 table export refactor (#3073) #905

[MIM-1947] Mim 1947 table export refactor (#3073)

[MIM-1947] Mim 1947 table export refactor (#3073) #905

Workflow file for this run

name: 'Deploy to QA'
on:
push:
branches:
- 'develop'
workflow_dispatch: # Allows the workflow to be manually triggered.
concurrency:
group: mimir-qa
cancel-in-progress: true
jobs:
deploy_to_qa:
name: 'Deploy to QA'
runs-on: 'ubuntu-latest'
environment: 'QA_mimir'
steps:
- id: build_app
uses: enonic/release-tools/build-and-publish@master
with:
skipPublishing: true
- id: deploy_app_to_XP
uses: 'enonic/action-app-deploy@main'
with:
url: ${{ secrets.ENONIC_QA_URL }}
username: ${{ secrets.ENONIC_USER }}
password: ${{ secrets.ENONIC_QA_PASS }}
client_cert: ${{ secrets.ENONIC_CERT }}
client_key: ${{ secrets.ENONIC_KEY }}
app_jar: './build/libs/*.jar'
- name: Upload artifacts
id: upload_artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: mimir-qa-${{ github.run_number }}
path: './build/libs/*.jar'
- name: Send success message to Slack
id: slack_success
if: success()
uses: slackapi/slack-github-action@v1
with:
# Using Github block kit (https://api.slack.com/reference/block-kit/blocks) to configure the Slack message, see https://docs.github.com/en/actions/learn-github-actions/contexts
# for more information about context variables
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "${{ github.workflow }} in ${{ github.repository }}"
}
},
{
"type": "context",
"elements": [
{
"type": "image",
"image_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
"alt_text" : "Github logo"
},
{
"type": "mrkdwn",
"text": "Run by: *${{ github.actor }}* on: *${{ github.ref_name }}*"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🛠 Build ${{ github.run_number }} is a *${{ job.status }}*, well done!\n<${{ github.event.pull_request.html_url || github.event.head_commit.url }}|Commit or PR>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERTS_QA }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Send failure message to Slack
id: slack_failure
if: failure()
uses: slackapi/slack-github-action@v1
with:
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "${{ github.workflow }} in ${{ github.repository }}"
}
},
{
"type": "context",
"elements": [
{
"type": "image",
"image_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
"alt_text" : "Github logo"
},
{
"type": "mrkdwn",
"text": "Run by: *${{ github.actor }}* on: *${{ github.ref_name }}*"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "💣 Build ${{ github.run_number }} is a *${{ job.status }}*, and that's cool!\nIf you want to fix it, start by looking at the <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow output>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_MIMIR_UTV }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
mabl_test:
# Run this job after deploy is finished, and only run if deploy succeeded
needs: deploy_to_qa
if: ${{ always() && contains(join(needs.*.result, ','), 'success') }}
runs-on: ubuntu-latest
container: node:lts
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Branch name and commit hash
run: |
echo running on branch ${GITHUB_HEAD_REF##*/} or ${GITHUB_REF##*/}
echo running $(echo $GITHUB_SHA | cut -c1-8) and ${GITHUB_SHA}
- name: install mabl
run: npm install -g @mablhq/mabl-cli
- name: mabl end-to-end test - TEST
run: mabl deployments create --api-key ${{ secrets.MABLAPIKEY }} --application-id ${{ secrets.MABLAPPID }} --environment-id ${{ secrets.MABLENVQA }} --labels MIMIR --await-completion