Skip to content

Commit

Permalink
Update slack language
Browse files Browse the repository at this point in the history
  • Loading branch information
jdangerx committed Jan 29, 2024
1 parent 8a337f1 commit 13416cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy-pudl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
uses: slackapi/slack-github-action@v1
with:
channel-id: "C03FHB9N0PQ"
slack-message: "build-deploy-pudl status: ${{ (env.SKIP_BUILD == 'true') && 'skipped' || job.status }}\n${{ env.GCS_OUTPUT_BUCKET }}/${{ env.BUILD_ID }}"
slack-message: "`${{ env.BUILD_ID }}` build-deploy-pudl status: ${{ (env.SKIP_BUILD == 'true') && 'skipped' || job.status }}\n${{ env.GCS_OUTPUT_BUCKET }}/${{ env.BUILD_ID }}"
env:
channel-id: "C03FHB9N0PQ"
SLACK_BOT_TOKEN: ${{ secrets.PUDL_DEPLOY_SLACK_TOKEN }}
14 changes: 9 additions & 5 deletions docker/gcp_pudl_etl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ function zenodo_data_release() {
function notify_slack() {
# Notify pudl-deployment slack channel of deployment status
echo "Notifying Slack about deployment status"
message='# `${BUILD_ID}` status\n\n'
if [[ "$1" == "success" ]]; then
message=":large_green_circle: :sunglasses: :unicorn_face: :rainbow: The deployment succeeded!! :partygritty: :database_parrot: :blob-dance: :large_green_circle:\n\n"
message+=":large_green_circle: :sunglasses: :unicorn_face: :rainbow: deployment succeeded!! :partygritty: :database_parrot: :blob-dance: :large_green_circle:\n\n"
elif [[ "$1" == "failure" ]]; then
message=":x: Oh bummer the deployment failed :fiiiiine: :sob: :cry_spin: :x:\n\n"
message+=":x: Oh bummer the deployment failed :fiiiiine: :sob: :cry_spin: :x:\n\n"
else
echo "Invalid deployment status"
exit 1
Expand All @@ -143,11 +144,14 @@ function notify_slack() {
message+="DISTRIBUTION_BUCKET_SUCCESS: $DISTRIBUTION_BUCKET_SUCCESS\n"
message+="ZENODO_SUCCESS: $ZENODO_SUCCESS\n\n"

message+="Logs on <https://console.cloud.google.com/batch/jobsDetail/regions/us-west1/jobs/run-etl-$BUILD_ID/logs?project=catalyst-cooperative-pudl|Google Batch Console>.\n\n"
message+="See <https://console.cloud.google.com/storage/browser/builds.catalyst.coop/$BUILD_ID|GCS> for outputs."
message+="*Query* logs on <https://console.cloud.google.com/batch/jobsDetail/regions/us-west1/jobs/run-etl-$BUILD_ID/logs?project=catalyst-cooperative-pudl|Google Batch Console>.\n\n"

message+="*Download* logs at <https://console.cloud.google.com/storage/browser/_details/builds.catalyst.coop/$BUILD_ID/$BUILD_ID-pudl-etl.log|gs://builds.catalyst.coop/${BUILD_ID}/${BUILD_ID}-pudl-etl.log>\n\n"

message+="Get *full outputs* at <https://console.cloud.google.com/storage/browser/builds.catalyst.coop/$BUILD_ID|gs://builds.catalyst.coop/${BUILD_ID}>."

send_slack_msg "$message"
upload_file_to_slack "$LOGFILE" "pudl_etl logs for $BUILD_ID:"
upload_file_to_slack "$LOGFILE" "$BUILD_ID logs:"
}

function update_nightly_branch() {
Expand Down

0 comments on commit 13416cf

Please sign in to comment.