mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-02 19:39:56 -05:00
/.github/{actions, workflows}: send email to pusher if bats-windows fails
This commit is contained in:
@@ -6,7 +6,7 @@ inputs:
|
||||
required: true
|
||||
default: ''
|
||||
version:
|
||||
description: 'dolt version being benchmarked'
|
||||
description: 'dolt version being benchmarked or ref of bats windows job'
|
||||
required: true
|
||||
default: ''
|
||||
template:
|
||||
@@ -14,7 +14,7 @@ inputs:
|
||||
required: false
|
||||
default: 'PerformanceBenchmarkingReleaseTemplate'
|
||||
dataFile:
|
||||
required: true
|
||||
required: false
|
||||
description: 'path to email data file'
|
||||
default: ''
|
||||
toAddresses:
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Template": {
|
||||
"TemplateName": "BatsWindowsFailureTemplate",
|
||||
"SubjectPart": "Bats on Windows failed for ref: {{version}}",
|
||||
"HtmlPart": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Bats on Windows Failed</title>\n</head><body>Bats on Windows failed for ref: {{version}}</body></html>",
|
||||
"TextPart": "Bats on Windows failed for ref {{version}}\r\n"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ const CcAddresses = JSON.parse(core.getInput('ccAddresses'));
|
||||
const ToAddresses = JSON.parse(core.getInput('toAddresses'));
|
||||
const ReplyToAddresses = JSON.parse(core.getInput('replyToAddresses'));
|
||||
|
||||
const data = fs.readFileSync(dataFilePath, { encoding: 'utf-8' });
|
||||
const data = dataFilePath ? fs.readFileSync(dataFilePath, { encoding: 'utf-8' }) : "";
|
||||
|
||||
const templated = {
|
||||
version,
|
||||
|
||||
@@ -150,3 +150,31 @@ jobs:
|
||||
env:
|
||||
IS_WINDOWS: true
|
||||
WINDOWS_BASE_DIR: "/d/a"
|
||||
|
||||
report-bats-failure:
|
||||
name: Report Bats Windows Failure via Email
|
||||
needs: test-per-file
|
||||
runs-on: ubuntu-18.04
|
||||
if: always() && (needs.test-per-file.result == 'failure')
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-west-2
|
||||
- name: Send Email
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
uses: ./.github/actions/ses-email-action
|
||||
with:
|
||||
region: us-west-2
|
||||
version: ${{ github.head_ref }}
|
||||
toAddresses: '["${{ github.event.inputs.email }}"]'
|
||||
- name: Send Email
|
||||
if: ${{ github.event_name == 'repository_dispatch' }}
|
||||
uses: ./.github/actions/ses-email-action
|
||||
with:
|
||||
region: us-west-2
|
||||
version: ${{ github.event.client_payload.ref }}
|
||||
toAddresses: '["${{ github.event.client_payload.actor_email }}"]'
|
||||
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
run: ./.github/scripts/performance-benchmarking/run-benchmarks.sh
|
||||
env:
|
||||
FROM_SERVER: 'mysql'
|
||||
FROM_VERSION: '8.0.22'
|
||||
FROM_VERSION: '8.0.28'
|
||||
TO_SERVER: 'dolt'
|
||||
TO_VERSION: ${{ needs.set-version-actor.outputs.version }}
|
||||
MODE: 'release'
|
||||
|
||||
Reference in New Issue
Block a user