Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDD-2442 Set Up CI/CD Workflow for auth-dev and auth-test Environments #1248

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

ChristianAMartin
Copy link
Contributor

We need to set up and integrate the CI/CD pipeline for the newly provisioned auth-dev and auth-test AWS accounts. This involves ensuring the infrastructure deployment process is automated and aligned with existing workflows for other environments.

Copy link

github-actions bot commented Feb 13, 2025

unit test coverage report

Title Lines Statements Branches Functions
lambda-producer-handler Coverage: 100%
100% (41/41) 25% (2/8) 100% (8/8)
lambda-db-password-rotation Coverage: 100%
100% (26/26) 40% (4/10) 100% (4/4)
lambda-alarm-notification Coverage: 100%
100% (23/23) 100% (5/5)
legacy-dashboard-redirect-viewer-request Coverage: 100%
100% (16/16) 100% (4/4) 100% (3/3)
public-api-cloud-front-viewer-request Coverage: 100%
100% (18/18) 100% (12/12) 100% (3/3)
Title Tests Skipped Failures Errors Time
lambda-producer-handler 16 0 💤 0 ❌ 0 🔥 0.787s ⏱️
lambda-db-password-rotation 5 0 💤 0 ❌ 0 🔥 0.636s ⏱️
lambda-alarm-notification 5 0 💤 0 ❌ 0 🔥 0.641s ⏱️
legacy-dashboard-redirect-viewer-request 10 0 💤 0 ❌ 0 🔥 0.487s ⏱️
public-api-cloud-front-viewer-request 11 0 💤 0 ❌ 0 🔥 0.492s ⏱️

@ChristianAMartin ChristianAMartin force-pushed the task/configure-cicd-pipeline/CDD-2442 branch 2 times, most recently from 8b44df5 to ca48516 Compare February 18, 2025 09:34
@ChristianAMartin ChristianAMartin marked this pull request as ready for review February 19, 2025 09:39
@ChristianAMartin ChristianAMartin requested a review from a team as a code owner February 19, 2025 09:39
@ChristianAMartin ChristianAMartin force-pushed the task/configure-cicd-pipeline/CDD-2442 branch 2 times, most recently from 59be983 to 8572079 Compare February 19, 2025 10:01
- name: Set AWS Role for Target Environment
env:
TARGET_ENV: ${{ needs.build_base.outputs.target_env || 'test' }}
AWS_ROLE_AUTH_DEV: ${{ secrets.UHD_TERRAFORM_ROLE_AUTH_DEV }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this please, we shouldn't be touching the dev account from the PR workflow

AWS_ROLE_TEST: ${{ secrets.UHD_TERRAFORM_ROLE_TEST }}
run: |
if [[ "$TARGET_ENV" == "auth-dev" ]]; then
echo "AWS_ROLE=$AWS_ROLE_AUTH_DEV" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above, we should only be interacting with either of the test accounts from the PR workflow

@@ -149,6 +149,8 @@ jobs:
dev-account-role: ${{ secrets.UHD_TERRAFORM_ROLE_DEV }}
test-account-role: ${{ secrets.UHD_TERRAFORM_ROLE_TEST }}
uat-account-role: ${{ secrets.UHD_TERRAFORM_ROLE_UAT }}
auth-dev-account-role: ${{ secrets.UHD_TERRAFORM_ROLE_AUTH_DEV }}
Copy link
Contributor

@A-Ashiq A-Ashiq Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that these roles won't exist yet, so we've got the chicken & egg situation I was talking about before.
I think we'll likely need to deploy to those envs from our machines the first time around, and then we can pass in the role ARN to these secrets

fi

if [[ $workspace == *"auth"* ]]; then
_get_auth_target_aws_account_name "$workspace"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much nicer now 👍

fi
}

function _get_auth_target_aws_account_name() {
local workspace=$1

Copy link
Contributor

@A-Ashiq A-Ashiq Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need a case to handle the ephemeral CI environments too being matched to the auth-test account

@ChristianAMartin ChristianAMartin force-pushed the task/configure-cicd-pipeline/CDD-2442 branch from df28a70 to 042d250 Compare February 27, 2025 10:52
@ChristianAMartin ChristianAMartin force-pushed the task/configure-cicd-pipeline/CDD-2442 branch from d856dde to ccc4f1a Compare February 28, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants