From 7319130e359888c2cad8d0baf0574a716d5ddbd8 Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:48:32 -0500 Subject: [PATCH 1/4] Slack 508 success/failure --- .github/workflows/check_508_compliance.yml | 28 +++++++++++++++++++++- .github/workflows/deploy.yml | 27 +++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml index 6e3980e..5b10920 100644 --- a/.github/workflows/check_508_compliance.yml +++ b/.github/workflows/check_508_compliance.yml @@ -31,4 +31,30 @@ jobs: TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/docsV2.html" TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/updates.html" docker run --init --rm --cap-add=SYS_ADMIN orenfromberg/axe-puppeteer-ci:1.0.0@sha256:f83527a3ae8ab74088c001abfe44836946ba73f0afbbf460447f8a0c40281e70 $TARGETS_TO_SCAN - + - uses: slackapi/slack-github-action@v2.0.0 + name: Slack Success + with: + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} + # Sends to dpc-deploys + payload: | + channel: "CMC1E4AEQ" + attachments: + - color: good + text: SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|Static Site 508 Compliance> completed against `${{ inputs.target_host }}`" + mrkdown_in: + - text + - uses: slackapi/slack-github-action@v2.0.0 + name: Slack failure + if: ${{ falure() }} + with: + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} + # Sends to dpc-deploys + payload: | + channel: "CMC1E4AEQ" + attachments: + - color: danger + text: "FAILURE: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|Static Site 508 Compliance> completed against `${{ inputs.target_host }}`" + mrkdown_in: + - text diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 28d0f64..c15923a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -86,3 +86,30 @@ jobs: run: | DISTRIBUTION_ID=`aws cloudfront list-distributions --query "DistributionList.Items[].{Id:Id, OriginDomainName: Origins.Items[0].DomainName}[?starts_with(OriginDomainName, '$TARGET_BUCKET')].Id" --output text` aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths '/*' + - uses: slackapi/slack-github-action@v2.0.0 + name: Slack Success + with: + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} + # Sends to dpc-deploys + payload: | + channel: "CMC1E4AEQ" + attachments: + - color: good + text: SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }} deployed to ${{ inputs.target_environment }} environment." + mrkdown_in: + - text + - uses: slackapi/slack-github-action@v2.0.0 + name: Slack failure + if: ${{ falure() }} + with: + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} + # Sends to dpc-deploys + payload: | + channel: "CMC1E4AEQ" + attachments: + - color: danger + text: FAILURE: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }} deployed to ${{ inputs.target_environment }} environment." + mrkdown_in: + - text From 0cc3d0694768ea6ea9c4e7242fecf3ea52bb83e0 Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:50:07 -0500 Subject: [PATCH 2/4] Slack 508 success/failure --- .github/workflows/check_508_compliance.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml index 5b10920..cba15e2 100644 --- a/.github/workflows/check_508_compliance.yml +++ b/.github/workflows/check_508_compliance.yml @@ -46,7 +46,7 @@ jobs: - text - uses: slackapi/slack-github-action@v2.0.0 name: Slack failure - if: ${{ falure() }} + if: ${{ failure() }} with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c15923a..185d964 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -101,7 +101,7 @@ jobs: - text - uses: slackapi/slack-github-action@v2.0.0 name: Slack failure - if: ${{ falure() }} + if: ${{ failure() }} with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} From 01ebd670704723ab682e2b13d95a73e521ed5c2e Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:55:17 -0500 Subject: [PATCH 3/4] Slack 508 success/failure --- .github/workflows/check_508_compliance.yml | 2 +- .github/workflows/deploy.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml index cba15e2..bf6b8ce 100644 --- a/.github/workflows/check_508_compliance.yml +++ b/.github/workflows/check_508_compliance.yml @@ -41,7 +41,7 @@ jobs: channel: "CMC1E4AEQ" attachments: - color: good - text: SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|Static Site 508 Compliance> completed against `${{ inputs.target_host }}`" + text: "SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|Static Site 508 Compliance> completed against `${{ inputs.target_host }}`" mrkdown_in: - text - uses: slackapi/slack-github-action@v2.0.0 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 185d964..e11530c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -96,7 +96,7 @@ jobs: channel: "CMC1E4AEQ" attachments: - color: good - text: SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }} deployed to ${{ inputs.target_environment }} environment." + text: "SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }} deployed to ${{ inputs.target_environment }} environment." mrkdown_in: - text - uses: slackapi/slack-github-action@v2.0.0 @@ -110,6 +110,6 @@ jobs: channel: "CMC1E4AEQ" attachments: - color: danger - text: FAILURE: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }} deployed to ${{ inputs.target_environment }} environment." + text: "FAILURE: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }} deployed to ${{ inputs.target_environment }} environment." mrkdown_in: - text From 96496700852eae72e9660f893150b7e61e0966fb Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:06:45 -0500 Subject: [PATCH 4/4] formatting --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e11530c..34fb07a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -96,7 +96,7 @@ jobs: channel: "CMC1E4AEQ" attachments: - color: good - text: "SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }} deployed to ${{ inputs.target_environment }} environment." + text: "SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }}` deployed to ${{ inputs.target_environment }} environment." mrkdown_in: - text - uses: slackapi/slack-github-action@v2.0.0 @@ -110,6 +110,6 @@ jobs: channel: "CMC1E4AEQ" attachments: - color: danger - text: "FAILURE: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }} deployed to ${{ inputs.target_environment }} environment." + text: "FAILURE: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|static site version> `${{ inputs.static_repo_ref }}` deployed to ${{ inputs.target_environment }} environment." mrkdown_in: - text