From 76ad5bc45af9b9435c0bb544d42a0e51f2905f84 Mon Sep 17 00:00:00 2001 From: Vitaly Terentyev Date: Wed, 25 Oct 2023 20:57:15 +0400 Subject: [PATCH] Add Send email step (#29088) --- .../beam_IODatastoresCredentialsRotation.yml | 18 +++++++++++++++++- .../beam_MetricsCredentialsRotation.yml | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beam_IODatastoresCredentialsRotation.yml b/.github/workflows/beam_IODatastoresCredentialsRotation.yml index 7a402e426fa7..0ededda00b39 100644 --- a/.github/workflows/beam_IODatastoresCredentialsRotation.yml +++ b/.github/workflows/beam_IODatastoresCredentialsRotation.yml @@ -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 dev@beam.apache.org if something went wrong during credentials rotation \ No newline at end of file + - 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: dev@beam.apache.org + from: gactions@beam.apache.org + 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 \ No newline at end of file diff --git a/.github/workflows/beam_MetricsCredentialsRotation.yml b/.github/workflows/beam_MetricsCredentialsRotation.yml index 839a8cba0ed0..eda3ec355631 100644 --- a/.github/workflows/beam_MetricsCredentialsRotation.yml +++ b/.github/workflows/beam_MetricsCredentialsRotation.yml @@ -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 dev@beam.apache.org if something went wrong during credentials rotation \ No newline at end of file + - 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: dev@beam.apache.org + from: gactions@beam.apache.org + 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 \ No newline at end of file