Skip to content

Commit 770ae57

Browse files
author
Sheyla Trudo
committed
fixup! Artifacts
1 parent f4e922e commit 770ae57

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.pipelines/templates/artifact-storage.steps.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,16 +258,19 @@ steps:
258258
set -e
259259
[[ -n $SYSTEM_DEBUG ]] && [[ $SYSTEM_DEBUG =~ $IS_TRUE ]] && set -x || set +x
260260
261+
R_QUERY="[? principalId == '$ACNCI_MANAGEDIDENTITY_OBJECTID' ]"
261262
MI_ROLE_DATA=$(az role assignment list \
262263
--role "$ACNCI_BUILDUSER_ROLE_NAME"
263-
--assignee "$ACNCI_MANAGEDIDENTITY_OBJECTID" \
264+
--resource-group "$ACNCI_BUILD_RESOURCEGROUP"
265+
--query "$R_QUERY"
264266
--output json | jq -rc '.')
265267
MI_ROLE_DATA_LENGTH=$(echo "$MA_ROLE_DATA" | jq length)
266268
echo >&2 "##vso[task.setvariable variable=MI_ROLE_DATA;]$MI_ROLE_DATA"
267269
echo >&2 "##vso[task.setvariable variable=MI_ROLE_LENGTH;]$MI_ROLE_DATA_LENGTH"
268270
env:
269271
ACNCI_BUILDUSER_ROLE_NAME: $(ACNCI_BUILDUSER_ROLE_NAME)
270272
ACNCI_MANAGEDIDENTITY_OBJECTID: $(managedidentity.ACNCI_MANAGEDIDENTITY_OBJECTID)
273+
ACNCI_BUILD_RESOURCEGROUP: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP)
271274

272275
- task: AzureCLI@2
273276
displayName: "[Provision] Build User ManagedIdentity Roles"
@@ -301,7 +304,7 @@ steps:
301304
ACNCI_MANAGEDIDENTITY_OBJECTID: $(managedidentity.ACNCI_MANAGEDIDENTITY_OBJECTID)
302305
ACNCI_BUILDUSER_ROLE_NAME: $(ACNCI_BUILDUSER_ROLE_NAME)
303306
MI_ROLE_DATA: $(MI_ROLE_DATA)
304-
MI_ROLE_DATALENGTH: $(MI_ROLE_DATA_LENGTH)
307+
MI_ROLE_DATA_LENGTH: $(MI_ROLE_DATA_LENGTH)
305308

306309

307310
#- task: AzureCLI@2

0 commit comments

Comments
 (0)