Skip to content

Commit 967ce8a

Browse files
author
Sheyla Trudo
committed
fixup! User Service Connections
1 parent aed347e commit 967ce8a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,27 @@ steps:
307307
STORAGECONTAINER_NAME: "azure-container-networking-pr"
308308
STORAGEBLOB_PATH: $(Build.BuildId)/$(System.JobAttempt)
309309

310+
311+
- task: AzureCLI@2
312+
name: build_storage
313+
displayName: "[Provision] Give Test Permissions to Primary"
314+
inputs:
315+
azureSubscription: $(ACN_TEST_SERVICE_CONNECTION)
316+
scriptType: bash
317+
scriptLocation: inlineScript
318+
inlineScript: |
319+
set -e
320+
[[ -n $SYSTEM_DEBUG ]] && [[ $SYSTEM_DEBUG =~ $IS_TRUE ]] && set -x || set +x
321+
322+
az role assignment create \
323+
--role "Storage Blob Data Contributor" \
324+
--assignee-object-id "$servicePrincipalId" \
325+
--assignee-principal-type "ServicePrincipal" \
326+
--scope "$RESOURCEGROUP_ID"
327+
env:
328+
RESOURCEGROUP_ID: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP_ID)
329+
330+
310331
- task: AzureCLI@2
311332
name: build_storage
312333
displayName: "[Provision] Establish Build Storage"

0 commit comments

Comments
 (0)