Skip to content

Commit 7f2d800

Browse files
author
Sheyla Trudo
committed
fixup! Artifacts
1 parent e2a501d commit 7f2d800

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,29 +224,26 @@ steps:
224224
225225
set -x
226226
pwd
227-
ls -la
228-
DEFS_FOUND=$(az role definition list \
229-
--name "$ACNCI_BUILDUSER_ROLE_NAME" \
230-
--custom-role-only -ojson | jq length)
231-
232-
DEF=$(cat ./azure-container-networking/.pipelines/templates/mi-build-role.json | \
233-
jq -rc \
234-
--arg RESOURCEID "/subscriptions/$SUBSCRIPTION_ID" \
235-
'.assignableScopes[] = $RESOURCEID')
236-
227+
DEFS_FOUND=$(az role definition list --name "$ACNCI_BUILDUSER_ROLE_NAME" --custom-role-only -ojson | jq length)
228+
229+
DEF=$(cat ./azure-container-networking/.pipelines/templates/mi-build-role.json | jq -rc --arg RESOURCEID "/subscriptions/$SUBSCRIPTION_ID" '.assignableScopes[] = $RESOURCEID')
230+
echo "here1"
237231
if (( "$DEFS_FOUND" < 1 )); then
232+
echo "here2"
238233
az role definition create --role-definition "$DEF"
239234
240235
else if (( "$DEFS_FOUND" > 0 )); then
236+
echo "here3"
241237
az role definition update --role-definition "$DEF"
242238
243239
else
240+
echo "here4"
244241
echo >&2 "##[error]There was an error creating/updating the role definition."
245242
exit 1
246243
fi
247-
echo $DEF | jq .
248-
env:
249-
ACNCI_BUILD_RESOURCEGROUP_ID: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP_ID)
244+
echo "here5"
245+
#env:
246+
# ACNCI_BUILD_RESOURCEGROUP_ID: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP_ID)
250247

251248
- task: AzureCLI@2
252249
displayName: "[Check] Build User MI Roles"

0 commit comments

Comments
 (0)