Skip to content

Commit 291e131

Browse files
committed
test
1 parent e65f798 commit 291e131

File tree

1 file changed

+38
-16
lines changed

1 file changed

+38
-16
lines changed

.github/workflows/deploy-quicksight.yml

+38-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: deploy-quicksight
22

33
on:
4+
push:
5+
branches:
6+
- AB2D-6529/Deploy_Quicksights
7+
48
workflow_call:
59
inputs:
610
apply:
@@ -43,6 +47,9 @@ jobs:
4347
deploy:
4448
runs-on: self-hosted
4549

50+
env:
51+
ENV: test
52+
4653
steps:
4754
- name: Set environment variables
4855
uses: cmsgov/ab2d-bcda-dpc-platform/actions/aws-params-env-action@main
@@ -64,27 +71,42 @@ jobs:
6471

6572
- name: Set variables for AB2D environment
6673
run: |
67-
if [ ${{ inputs.environment }} = "dev" ]; then
68-
AB2D_ENV='ab2d-dev'
69-
elif [ ${{ inputs.environment }} = "test" ]; then
70-
AB2D_ENV='ab2d-east-impl'
71-
elif [ ${{ inputs.environment }} = "sbx" ]; then
72-
AB2D_ENV='ab2d-sbx-sandbox'
73-
elif [ ${{ inputs.environment }} = "prod_test" ]; then
74-
AB2D_ENV='ab2d-east-prod-test'
75-
elif [ ${{ inputs.environment }} = "prod" ]; then
76-
AB2D_ENV='ab2d-east-prod'
77-
else
78-
echo "Unable to determine AB2D environment";
79-
exit 1
80-
fi
74+
if [ "$ENV" = "dev" ]; then
75+
AB2D_ENV='ab2d-dev'
76+
elif [ "$ENV" = "test" ]; then
77+
AB2D_ENV='ab2d-east-impl'
78+
elif [ "$ENV" = "sbx" ]; then
79+
AB2D_ENV='ab2d-sbx-sandbox'
80+
elif [ "$ENV" = "prod_test" ]; then
81+
AB2D_ENV='ab2d-east-prod-test'
82+
elif [ "$ENV" = "prod" ]; then
83+
AB2D_ENV='ab2d-east-prod'
84+
else
85+
echo "Unable to determine AB2D environment";
86+
exit
87+
fi
88+
# if [ ${{ inputs.environment }} = "dev" ]; then
89+
# AB2D_ENV='ab2d-dev'
90+
# elif [ ${{ inputs.environment }} = "test" ]; then
91+
# AB2D_ENV='ab2d-east-impl'
92+
# elif [ ${{ inputs.environment }} = "sbx" ]; then
93+
# AB2D_ENV='ab2d-sbx-sandbox'
94+
# elif [ ${{ inputs.environment }} = "prod_test" ]; then
95+
# AB2D_ENV='ab2d-east-prod-test'
96+
# elif [ ${{ inputs.environment }} = "prod" ]; then
97+
# AB2D_ENV='ab2d-east-prod'
98+
# else
99+
# echo "Unable to determine AB2D environment";
100+
# exit 1
101+
# fi
81102

82103
echo "AB2D_ENV=${AB2D_ENV}" >> $GITHUB_ENV
83104

84105
- name: Assume role in AB2D account for this environment
85106
uses: aws-actions/configure-aws-credentials@v4
86107
env:
87-
ACCOUNT: ${{ inputs.environment == 'prod_test' && 'prod' || inputs.environment }}
108+
# ACCOUNT: ${{ inputs.environment == 'prod_test' && 'prod' || inputs.environment }}
109+
ACCOUNT: test
88110
with:
89111
aws-region: ${{ vars.AWS_REGION }}
90112
role-to-assume: arn:aws:iam::${{ secrets[format('{0}_ACCOUNT_ID', env.ACCOUNT)] }}:role/delegatedadmin/developer/ab2d-${{ env.ACCOUNT }}-github-actions
@@ -102,7 +124,7 @@ jobs:
102124
terraform plan -var env=${AB2D_ENV} -out=quicksight.tfplan
103125
104126
- name: Terraform apply
105-
if: ${{ inputs.apply == true }}
127+
# if: ${{ inputs.apply == true }}
106128
run: |
107129
set -e
108130
cd terraform/environments/ab2d/quicksight/

0 commit comments

Comments
 (0)