Skip to content

Commit 47a5a9e

Browse files
authored
Merge pull request #8 from roger-zhangg/integ
Integ
2 parents dc14d88 + b4d22b4 commit 47a5a9e

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ jobs:
296296
- name: Get testing resources and credentials
297297
run: |
298298
# Try with skip_role_deletion parameter first
299-
test_env_var=$(python3.9 tests/get_testing_resources.py skip_role_deletion 2>&1)
299+
test_env_var=$(python3.9 tests/get_testing_resources.py skip_role_deletion)
300300
301301
if [ $? -ne 0 ]; then
302302
echo "First attempt with skip_role_deletion failed, trying without parameter..."
@@ -313,8 +313,18 @@ jobs:
313313
echo "CI_ACCESS_ROLE_AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" >> $GITHUB_ENV
314314
echo "CI_ACCESS_ROLE_AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN" >> $GITHUB_ENV
315315
316-
# Set test credentials
317-
echo "AWS_ACCESS_KEY_ID=$(echo "$test_env_var" | jq -j ".accessKeyID")" >> $GITHUB_ENV
316+
# Set test credentials with error handling for AWS_ACCESS_KEY_ID
317+
AWS_ACCESS_KEY_ID=$(echo "$test_env_var" | jq -j ".accessKeyID" 2>/dev/null) || {
318+
echo "ERROR: Failed to parse accessKeyID from JSON"
319+
echo "Actual payload received:"
320+
echo "==================== START PAYLOAD ===================="
321+
echo "${test_env_var:0:30}"
322+
echo "==================== END PAYLOAD ===================="
323+
exit 1
324+
}
325+
echo "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" >> $GITHUB_ENV
326+
327+
# Set remaining credentials
318328
echo "AWS_SECRET_ACCESS_KEY=$(echo "$test_env_var" | jq -j ".secretAccessKey")" >> $GITHUB_ENV
319329
echo "AWS_SESSION_TOKEN=$(echo "$test_env_var" | jq -j ".sessionToken")" >> $GITHUB_ENV
320330
echo "TASK_TOKEN=$(echo "$test_env_var" | jq -j ".taskToken")" >> $GITHUB_ENV

0 commit comments

Comments
 (0)