Skip to content
Merged
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
548629e
Initial commit.
jonathan-cantu-icf Mar 23, 2026
f6dd4f3
Fix syntax error.
jonathan-cantu-icf Mar 24, 2026
2cdf7d7
Test for new build and deploy workflow
jonathan-cantu-icf Mar 25, 2026
8417980
Try to test once more.
jonathan-cantu-icf Mar 25, 2026
1e05ea3
Try to test once more.
jonathan-cantu-icf Mar 25, 2026
153fea6
Remove inadvertently added test file.
jonathan-cantu-icf Mar 25, 2026
759a46c
Retract unnecessary change so that it does't show up in the diff/chan…
jonathan-cantu-icf Mar 25, 2026
5aaf5e2
Cleanup branch.
jonathan-cantu-icf Apr 27, 2026
724fcc5
Address PR review recommendations.
jonathan-cantu-icf Apr 28, 2026
474ac36
Add Node version 24.
jonathan-cantu-icf Apr 28, 2026
7f3a1ec
Merge branch 'master' into feature/BFD-4248_GitHub-BuildAndDeploy-Sla…
jonathan-cantu-icf Apr 28, 2026
d3fc144
Fix missing aws-region error in GitHub gate checks.
jonathan-cantu-icf Apr 28, 2026
13c7f86
Assume AWS role for CDAP action credentials.
jonathan-cantu-icf Apr 28, 2026
5a3a38c
Assume AWS role for SOPS Slack Webhook.
jonathan-cantu-icf Apr 28, 2026
ba4c30f
Fix missing aws-region error in GitHub gate checks.
jonathan-cantu-icf Apr 28, 2026
dd87972
Assume AWS role for SOPS Slack Webhook.
jonathan-cantu-icf Apr 28, 2026
a41e579
Try #4: Assume AWS role for SOPS Slack Webhook.
jonathan-cantu-icf Apr 28, 2026
afdccea
Feedback from Mitch on AWS assumed role for the SOPS Webhook value re…
jonathan-cantu-icf Apr 28, 2026
1bd5e24
Fix payload type issue in slack webhook message.
jonathan-cantu-icf Apr 28, 2026
189075c
Fixes to AWS role assumption/credentials.
jonathan-cantu-icf Apr 28, 2026
70ddf12
Fixes to AWS role assumption/credentials.
jonathan-cantu-icf Apr 28, 2026
6bf3f09
Fixes to AWS role assumption/credentials for Final Slack Summary.
jonathan-cantu-icf Apr 28, 2026
c28b2da
Fixes to AWS role assumption/credentials for Final Slack Summary.
jonathan-cantu-icf Apr 28, 2026
eebebfe
Fixes to AWS role assumption/credentials for Final Slack Summary.
jonathan-cantu-icf Apr 28, 2026
4845ef7
Merge branch 'master' into feature/BFD-4248_GitHub-BuildAndDeploy-Sla…
jonathan-cantu-icf Apr 28, 2026
b51a4af
Drop test push of branch - nice catch Burling.
jonathan-cantu-icf Apr 28, 2026
bde8531
Add a more specific 'runs-on' image for processing the release and de…
jonathan-cantu-icf Apr 28, 2026
4cc6d8b
Compromise on suggestion for setting AWS-REGION since CDAP's SOPS act…
jonathan-cantu-icf Apr 29, 2026
876c229
Add specific version to ubuntu image used for this release deploy wor…
jonathan-cantu-icf Apr 29, 2026
1ad9dba
Per review, add a comment as to why we are using non-prod creds to pu…
jonathan-cantu-icf Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 133 additions & 2 deletions .github/workflows/release-and-deploy-bfd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ on:
default: ""
aws-region:
description: >-
Override the AWS Region
Override the AWS Region destination for uploaded artifacts.
Default to `us-east-1`.
default: us-east-1
type: choice
options:
Expand All @@ -29,12 +30,62 @@ permissions:
id-token: write # This is required for requesting the AWS IAM OIDC JWT
contents: write # This is required for actions/checkout

env:
AWS_REGION: ${{ inputs.aws-region }}

defaults:
run:
shell: bash

jobs:
notify-start:
runs-on: ubuntu-24.04-arm
steps:
- name: Setup node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24.x

- name: Get role ARN
id: get-role-arn
run: |
role_arn="${{ secrets.NON_PROD_ACCOUNT_GHA_ROLE_ARN }}"
echo "::add-mask::$role_arn"
echo "role-arn=$role_arn" >> "$GITHUB_OUTPUT"

- name: Assume role to AWS
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
with:
role-to-assume: ${{ steps.get-role-arn.outputs.role-arn }}
role-session-name: get-sops-slack-webhook-${{ github.run_id }}-${{ github.run_attempt }}
aws-region: ${{ inputs.aws-region }}

- name: Load Start Slack webhook
uses: cmsgov/cdap/actions/aws-params-env-action@main
with:
params: |
SLACK_WEBHOOK_URL=/bfd/platform/alerting/sensitive/slack/bfd-notices/webhook

- name: Slack - STARTED
uses: slackapi/slack-github-action@03ea5433c137af7c0495bc0cad1af10403fc800c # v3.0.2
with:
webhook: ${{ env.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"attachments": [
{
"color": "yellow",
"title": "BFD Release STARTED",
"text": "Version: *${{ inputs.release-version || 'latest' }}*\n
Triggered by: ${{ github.actor }}\n
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Workflow Run>"
}
]
}

build-release:
needs: notify-start
if: ${{ github.ref_name == github.event.repository.default_branch }}
uses: ./.github/workflows/build-release.yml
with:
Expand All @@ -45,7 +96,7 @@ jobs:

deploy-platform:
uses: ./.github/workflows/deploy-platform-services.yml
needs: [build-release]
needs: build-release
strategy:
matrix:
account-type: ["prod", "non-prod"]
Expand Down Expand Up @@ -77,3 +128,83 @@ jobs:
bfd-env: prod
git-ref: refs/tags/${{ needs.build-release.outputs.bfd_release }}
secrets: inherit

workflow-summary:
name: Final Slack Summary
runs-on: ubuntu-latest
Comment thread
jonathan-cantu-icf marked this conversation as resolved.
Outdated
needs:
- build-release
- deploy-platform
- deploy-to-test
- deploy-to-sandbox
- deploy-to-prod
if: !cancelled()
steps:
- name: Get role ARN
id: get-role-arn
run: |
role_arn="${{ secrets.NON_PROD_ACCOUNT_GHA_ROLE_ARN }}"
Comment thread
jonathan-cantu-icf marked this conversation as resolved.
echo "::add-mask::$role_arn"
echo "role-arn=$role_arn" >> "$GITHUB_OUTPUT"

- name: Assume role to AWS
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
with:
role-to-assume: ${{ steps.get-role-arn.outputs.role-arn }}
role-session-name: get-sops-slack-webhook-${{ github.run_id }}-${{ github.run_attempt }}
aws-region: ${{ inputs.aws-region }}

- name: Load Slack webhook
uses: cmsgov/cdap/actions/aws-params-env-action@main
with:
params: |
SLACK_WEBHOOK_URL=/bfd/platform/alerting/sensitive/slack/bfd-notices/webhook

- name: Compute status
id: status
run: |
STAGES=("build-release" "deploy-platform" "deploy-to-test" "deploy-to-sandbox" "deploy-to-prod")
RESULTS='${{ toJSON(needs) }}'

FINAL_STATUS="SUCCESS"
FAILED_STAGE="none"
COLOR="good"

for STAGE in "${STAGES[@]}"; do
RESULT=$(echo $RESULTS | jq -r ".[\"$STAGE\"].result")
if [[ "$RESULT" != "success" && "$RESULT" != "skipped" ]]; then
FINAL_STATUS="FAILED"
FAILED_STAGE=$STAGE
COLOR="danger"
break
fi
done

echo "status=$FINAL_STATUS" >> $GITHUB_OUTPUT
echo "failed_stage=$FAILED_STAGE" >> $GITHUB_OUTPUT
echo "color=$COLOR" >> $GITHUB_OUTPUT

- name: Slack - FINAL SUMMARY
uses: slackapi/slack-github-action@03ea5433c137af7c0495bc0cad1af10403fc800c # v3.0.2
with:
webhook: ${{ env.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"attachments": [
{
"color": "${{ steps.status.outputs.color }}",
"title": "${{ steps.status.outputs.status == 'SUCCESS' && 'BFD Deploy SUCCESS' || 'BFD Deploy FAILED' }}",
"text": "${{ steps.status.outputs.status == 'FAILED' && '<!subteam^BFD-ENGINEERS|@bfd-engineers>' || '' }}\n
*Status:* ${{ steps.status.outputs.status }}\n
*Version:* ${{ inputs.release-version || 'latest' }}\n
*Failed Stage:* ${{ steps.status.outputs.failed_stage }}\n\n
*Build:* ${{ needs.build-release.result }}\n
*Platform:* ${{ needs.deploy-platform.result }}\n
*Test:* ${{ needs.deploy-to-test.result }}\n
*Sandbox:* ${{ needs.deploy-to-sandbox.result }}\n
*Prod:* ${{ needs.deploy-to-prod.result }}\n\n
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Full Report>"
}
]
}