Skip to content

Commit 59268ae

Browse files
committed
Refactor role handling to improve debug output and streamline ROLE existence check
1 parent 3baefdf commit 59268ae

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

azure/components/aws-assume-role.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,20 @@ steps:
1313

1414
- bash: |
1515
set -e
16-
if [ -z "$role" ]; then
17-
echo "ROLE is empty"
16+
echo "##vso[task.setvariable variable=ROLE]$role"
17+
env:
18+
role: ${{ parameters.role }}
19+
displayName: get role name
20+
21+
- bash: |
22+
if [ -z "$(ROLE)" ]; then
23+
echo "[DEBUG] ROLE is empty"
1824
echo "##vso[task.setvariable variable=ROLE_EXISTS]false"
1925
else
20-
echo "ROLE value: $role"
21-
echo "##vso[task.setvariable variable=ROLE]$role"
26+
echo "[DEBUG] ROLE value: $(ROLE)"
2227
echo "##vso[task.setvariable variable=ROLE_EXISTS]true"
2328
fi
24-
env:
25-
role: ${{ parameters.role }}
26-
displayName: get role name
29+
displayName: "Debug ROLE value (empty or not)"
2730
2831
- bash: |
2932
set -e

0 commit comments

Comments
 (0)