Skip to content

Commit 81db142

Browse files
author
Sheyla Trudo
committed
fixup! Artifacts
1 parent d856ab4 commit 81db142

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,23 @@ steps:
227227
ls -la
228228
DEFS_FOUND=$(az role definition list \
229229
--name "$ACNCI_BUILDUSER_ROLE_NAME" \
230-
--resource-group "$ACNCI_BUILDUSER_ROLE_NAME" \
231230
--custom-role-only -ojson | jq length)
232231
233232
DEF=$(cat ./azure-container-networking/.pipelines/templates/mi-build-role.json | \
234233
jq -rc \
235-
--arg RESOURCEID "$ACNCI_BUILD_RESOURCEGROUP_ID" \
234+
--arg RESOURCEID "/subscriptions/$SUBSCRIPTION_ID" \
236235
'.assignableScopes[] = $RESOURCEID')
237236
238237
echo $DEF | jq .
239238
if (( $DEFS_FOUND < 1 )); then
240239
az role definition create \
241240
--role-definition "$DEF"
242-
else
241+
else if (( $DEFS_FOUND == 0 )); then
243242
az role definition update \
244243
--role-definition "$DEF"
244+
else
245+
echo >&2 "##[error]There was an error creating/updating the role definition."
246+
exit 1
245247
fi
246248
env:
247249
ACNCI_BUILD_RESOURCEGROUP_ID: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP_ID)

0 commit comments

Comments
 (0)