@@ -141,9 +141,24 @@ jobs:
141
141
- name : Get RDS database cluster metadata
142
142
continue-on-error : true
143
143
run : |
144
- RDS_MYSQL_CLUSTER_ENDPOINT=$(aws rds describe-db-cluster-endpoints --db-cluster-identifier "rdsaurorapythonclusterformysql" --region ${{inputs.aws-region}} --query "DBClusterEndpoints[?EndpointType=='WRITER'].Endpoint | [0]" --output text)
144
+ if [ "${{ env.CLUSTER_NAME }}" = "e2e-enablement-script-test" ]; then
145
+ RDS_MYSQL_CLUSTER_IDENTIFIER="rdsauroraenablementscriptpythone2eclusterformysql"
146
+ elif [ "${{ env.CLUSTER_NAME }}" = "e2e-cw-agent-test" ]; then
147
+ RDS_MYSQL_CLUSTER_IDENTIFIER="rdsauroracwagente2eclusterformysql"
148
+ elif [ "${{ env.CLUSTER_NAME }}" = "e2e-python-adot-test" ]; then
149
+ RDS_MYSQL_CLUSTER_IDENTIFIER="rdsauroraadotpythone2eclusterformysql"
150
+ elif [ "${{ env.CLUSTER_NAME }}" = "e2e-cw-agent-operator-python-test" ]; then
151
+ RDS_MYSQL_CLUSTER_IDENTIFIER="rdsauroracwagentoperatorpythone2eclusterformysql"
152
+ elif [ "${{ env.CLUSTER_NAME }}" = "e2e-python-canary-test" ]; then
153
+ RDS_MYSQL_CLUSTER_IDENTIFIER="rdsaurorapythonclusterformysql"
154
+ elif [ "${{ env.CLUSTER_NAME }}" = "e2e-playground" ]; then
155
+ RDS_MYSQL_CLUSTER_IDENTIFIER="rdsauroraplaygroundclusterformysql"
156
+ else
157
+ echo "${{ env.CLUSTER_NAME }} is not a known cluster name"
158
+ exit 1
159
+ fi
160
+ RDS_MYSQL_CLUSTER_ENDPOINT=$(aws rds describe-db-cluster-endpoints --db-cluster-identifier $RDS_MYSQL_CLUSTER_IDENTIFIER --region ${{inputs.aws-region}} --query "DBClusterEndpoints[?EndpointType=='WRITER'].Endpoint | [0]" --output text)
145
161
echo RDS_MYSQL_CLUSTER_ENDPOINT="$RDS_MYSQL_CLUSTER_ENDPOINT" >> $GITHUB_ENV
146
- RDS_MYSQL_CLUSTER_IDENTIFIER=$(aws rds describe-db-cluster-endpoints --db-cluster-identifier "rdsaurorapythonclusterformysql" --region ${{inputs.aws-region}} --query "DBClusterEndpoints[?EndpointType=='WRITER'].DBClusterIdentifier | [0]" --output text)
147
162
RDS_MYSQL_CLUSTER_CREDENTIAL_SECRET_NAME=$(aws secretsmanager list-secrets --region ${{inputs.aws-region}} --query "SecretList[?Tags[?Value=='arn:aws:rds:${{inputs.aws-region}}:${{env.ACCOUNT_ID}}:cluster:$RDS_MYSQL_CLUSTER_IDENTIFIER']].Name | [0]" --output text)
148
163
echo RDS_MYSQL_CLUSTER_CREDENTIAL_SECRET_NAME="$RDS_MYSQL_CLUSTER_CREDENTIAL_SECRET_NAME" >> $GITHUB_ENV
149
164
0 commit comments