-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
8b44df5
to
ca48516
Compare
59be983
to
8572079
Compare
.github/workflows/pull-request.yml
Outdated
- 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 }} |
There was a problem hiding this comment.
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
.github/workflows/pull-request.yml
Outdated
AWS_ROLE_TEST: ${{ secrets.UHD_TERRAFORM_ROLE_TEST }} | ||
run: | | ||
if [[ "$TARGET_ENV" == "auth-dev" ]]; then | ||
echo "AWS_ROLE=$AWS_ROLE_AUTH_DEV" >> $GITHUB_ENV |
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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 | ||
|
There was a problem hiding this comment.
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
df28a70
to
042d250
Compare
d856dde
to
ccc4f1a
Compare
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.