Skip to content

Commit 987a8d1

Browse files
author
Sheyla Trudo
committed
fixup! Artifacts
1 parent b5c9a42 commit 987a8d1

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ steps:
2323
# App OID
2424
SP_APP_OID=$(az ad sp show --id "$servicePrincipalId" | jq -rc '.id')
2525
# Get Subscription ID.
26-
#SC_DATA_JSON=$(az devops service-endpoint list --organization msazure --project One | \
27-
# jq -rc --arg SP_APP_OID "$SP_APP_OID" \
28-
# '[ .[] | { name: .name, data: .data } | select((.serviceEndpointReferences | length) > 0) | select(.data.appObjectId == $SP_APP_OID) ][0]')
2926
SUBSCRIPTION_ID=$(az account show | jq -rc '.id')
3027
3128
# Get Pipeline Build Subscriptions.
@@ -47,7 +44,9 @@ steps:
4744
az group create \
4845
--name "$RG_NAME" \
4946
--location "$ACNCI_SA_LOCATION" \
50-
--tags Pipelines.CreatedBy="$servicePrincipalId" Pipelines.DefinitionID="$SYSTEM_DEFINITIONID"
47+
--tags "$ACNCI_BUILDTAG_DEFINITIONID"="$SYSTEM_DEFINITIONID" \
48+
"$ACNCI_BUILDTAG_CREATEDBYBUILDID"="$BUILD_BUILDID" \
49+
"$ACNCI_BUILDTAG_CREATEDBYAPPID"="$servicePrincipalId"
5150
# Storage Blob Data Contributor on RG
5251
RG_ID="/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${RG_NAME}"
5352
az role assignment create \

.pipelines/templates/get-storage-accounts.steps.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@ steps:
3030
R_QUERY="[? type == 'Microsoft.Storage/storageAccounts' && resourceGroup == '$RG_NAME']"
3131
az resource list \
3232
--query "$R_QUERY" \
33-
--tag "$ACNCI_BUILDTAG_DEFINITIONID"="$SYSTEM_DEFINITIONID" -o json
33+
--tag "$ACNCI_BUILDTAG_DEFINITIONID"="$SYSTEM_DEFINITIONID" \
34+
--tag "$ACNCI_BUILDTAG_CREATEDBYAPPID"="$servicePrincipalId" -o json
3435
echo $R_QUERY
36+
3537
# JSON of Returned Results
3638
R_LIST=$(az resource list \
3739
--query "$R_QUERY" \
38-
--tag "$ACNCI_BUILDTAG_DEFINITIONID"="$SYSTEM_DEFINITIONID" -o json)
40+
--tag "$ACNCI_BUILDTAG_DEFINITIONID"="$SYSTEM_DEFINITIONID" \
41+
--tag "$ACNCI_BUILDTAG_CREATEDBYAPPID"="$servicePrincipalId" -o json)
3942
echo $R_LIST
4043
# Length of resource list
4144
R_LIST_LENGTH=$(echo "$R_LIST" | jq length)

0 commit comments

Comments
 (0)