Skip to content

Commit

Permalink
Add Send email step (apache#29088)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amar3tto authored Oct 25, 2023
1 parent e4aef8c commit 76ad5bc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/beam_IODatastoresCredentialsRotation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,20 @@ jobs:
- name: Completing the rotation
run: |
gcloud container clusters update io-datastores --complete-credential-rotation --zone=us-central1-a --quiet
# TODO: Send email to [email protected] if something went wrong during credentials rotation
- name: Generate Date
run: |
date=$(date -u +"%Y-%m-%d")
echo "date=$date" >> $GITHUB_ENV
- name: Send email
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
secure: true
username: ${{ secrets.ISSUE_REPORT_SENDER_EMAIL_ADDRESS }}
password: ${{ secrets.ISSUE_REPORT_SENDER_EMAIL_PASSWORD }}
subject: Credentials Rotation Failure on IO-Datastores cluster (${{ env.date }})
to: [email protected]
from: [email protected]
body: |
Something went wrong during the automatic credentials rotation for IO-Datastores Cluster, performed at ${{ env.date }}. It may be necessary to check the state of the cluster certificates. For further details refer to the following links:\n * Failing job: https://github.com/apache/beam/actions/workflows/beam_IODatastoresCredentialsRotation.yml \n * Job configuration: https://github.com/apache/beam/blob/master/.github/workflows/beam_IODatastoresCredentialsRotation.yml \n * Cluster URL: https://pantheon.corp.google.com/kubernetes/clusters/details/us-central1-a/io-datastores/details?mods=dataflow_dev&project=apache-beam-testing
18 changes: 17 additions & 1 deletion .github/workflows/beam_MetricsCredentialsRotation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,20 @@ jobs:
- name: Completing the rotation
run: |
gcloud container clusters update metrics --complete-credential-rotation --zone=us-central1-a --quiet
# TODO: Send email to [email protected] if something went wrong during credentials rotation
- name: Generate Date
run: |
date=$(date -u +"%Y-%m-%d")
echo "date=$date" >> $GITHUB_ENV
- name: Send email
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
secure: true
username: ${{ secrets.ISSUE_REPORT_SENDER_EMAIL_ADDRESS }}
password: ${{ secrets.ISSUE_REPORT_SENDER_EMAIL_PASSWORD }}
subject: Credentials Rotation Failure on Metrics cluster (${{ env.date }})
to: [email protected]
from: [email protected]
body: |
Something went wrong during the automatic credentials rotation for Metrics Cluster, performed at ${{ env.date }}. It may be necessary to check the state of the cluster certificates. For further details refer to the following links:\n * Failing job: https://github.com/apache/beam/actions/workflows/beam_MetricsCredentialsRotation.yml \n * Job configuration: https://github.com/apache/beam/blob/master/.github/workflows/beam_MetricsCredentialsRotation.yml \n * Cluster URL: https://pantheon.corp.google.com/kubernetes/clusters/details/us-central1-a/metrics/details?mods=dataflow_dev&project=apache-beam-testing

0 comments on commit 76ad5bc

Please sign in to comment.