Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,6 @@
"name": "RELEASE_STAGE",
"value": "__RELEASE_STAGE__"
},
{
"name": "ACR_APP_ID",
"reference": {
"provider": "AzureKeyVault",
"parameters": {
"secretId": "https://cibuildandreleasekv.vault.azure.net/secrets/ciprodacrappid/e8f47bf7505741ebaf65a4db16ff9fa7"
}
},
"asSecureValue": "true"
},
{
"name": "ACR_APP_SECRET",
"reference": {
"provider": "AzureKeyVault",
"parameters": {
"secretId": "https://cibuildandreleasekv.vault.azure.net/secrets/ciprodacrappsecret/8718afcdac114accb8b26f613cef1e1e"
}
},
"asSecureValue": "true"
},
{
"name": "ACR_NAME",
"value": "__ACR_NAME__"
Expand All @@ -59,8 +39,14 @@
"name": "CHART_VERSION",
"value": "__CHART_VERSION__"
}
]
],
"identity": {
"type": "userAssigned",
"userAssignedIdentities": [
"__MANAGED_IDENTITY__"
]
}
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
"dependsOn": [ ]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
{
"find": "__CHART_VERSION__",
"replaceWith": "$(ChartVersion)"
},
{
"find": "__MANAGED_IDENTITY__",
"replaceWith": "$(ManagedIdentity)"
}
]
},
Expand All @@ -33,6 +37,10 @@
{
"find": "__CHART_VERSION__",
"replaceWith": "$(ChartVersion)"
},
{
"find": "__MANAGED_IDENTITY__",
"replaceWith": "$(ManagedIdentity)"
}
]
},
Expand All @@ -50,6 +58,10 @@
{
"find": "__CHART_VERSION__",
"replaceWith": "$(ChartVersion)"
},
{
"find": "__MANAGED_IDENTITY__",
"replaceWith": "$(ManagedIdentity)"
}
]
},
Expand All @@ -67,6 +79,10 @@
{
"find": "__CHART_VERSION__",
"replaceWith": "$(ChartVersion)"
},
{
"find": "__MANAGED_IDENTITY__",
"replaceWith": "$(ManagedIdentity)"
}
]
},
Expand All @@ -84,6 +100,10 @@
{
"find": "__CHART_VERSION__",
"replaceWith": "$(ChartVersion)"
},
{
"find": "__MANAGED_IDENTITY__",
"replaceWith": "$(ManagedIdentity)"
}
]
},
Expand All @@ -101,6 +121,10 @@
{
"find": "__CHART_VERSION__",
"replaceWith": "$(ChartVersion)"
},
{
"find": "__MANAGED_IDENTITY__",
"replaceWith": "$(ManagedIdentity)"
}
]
},
Expand All @@ -118,8 +142,12 @@
{
"find": "__CHART_VERSION__",
"replaceWith": "$(ChartVersion)"
},
{
"find": "__MANAGED_IDENTITY__",
"replaceWith": "$(ManagedIdentity)"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,24 @@ echo "START - Release stage : ${RELEASE_STAGE}"
echo "Using acr : ${ACR_NAME}"
echo "Using acr repo type: ${REPO_TYPE}"

#Login to az cli and authenticate to acr
echo "Login cli using managed identity"
az login --identity
if [ $? -eq 0 ]; then
echo "Logged in successfully"
else
echo "-e error az login with managed identity credentials failed. Please review the Ev2 pipeline logs for more details on the error."
exit 1
fi

ACCESS_TOKEN=$(az acr login --name ${ACR_NAME} --expose-token --output tsv --query accessToken)
if [ $? -ne 0 ]; then
echo "-e error az acr login failed. Please review the Ev2 pipeline logs for more details on the error."
exit 1
fi

echo "login to acr:${ACR_NAME} using helm ..."
echo $ACR_APP_SECRET | helm registry login $ACR_NAME --username $ACR_APP_ID --password-stdin
echo $ACCESS_TOKEN | helm registry login $ACR_NAME -u 00000000-0000-0000-0000-000000000000 --password-stdin
if [ $? -eq 0 ]; then
echo "login to acr:${ACR_NAME} using helm completed successfully."
else
Expand Down Expand Up @@ -178,4 +194,4 @@ case $RELEASE_STAGE in
;;
esac

echo "END - Release stage : ${RELEASE_STAGE}"
echo "END - Release stage : ${RELEASE_STAGE}"
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"AzureResourceGroupName": "ContainerInsightsExtension-Canary-Release",
"Location": "eastus2",
"InstanceOf": "ARC-Extension-ServiceResourceGroupDefinition",
"AzureSubscriptionId": "5fab7b6f-6150-42fe-89e1-0f07a0a9a46f",
"AzureSubscriptionId": "30c56c3a-54da-46ea-b004-06eb33432687",
"ScopeTags": [
{
"Name": "Canary"
Expand All @@ -51,7 +51,7 @@
"AzureResourceGroupName": "ContainerInsightsExtension-Pilot-Release",
"Location": "eastus2",
"InstanceOf": "ARC-Extension-ServiceResourceGroupDefinition",
"AzureSubscriptionId": "5fab7b6f-6150-42fe-89e1-0f07a0a9a46f",
"AzureSubscriptionId": "30c56c3a-54da-46ea-b004-06eb33432687",
"ScopeTags": [
{
"Name": "Pilot"
Expand All @@ -69,7 +69,7 @@
"AzureResourceGroupName": "ContainerInsightsExtension-LightLoad-Release",
"Location": "eastus2",
"InstanceOf": "ARC-Extension-ServiceResourceGroupDefinition",
"AzureSubscriptionId": "5fab7b6f-6150-42fe-89e1-0f07a0a9a46f",
"AzureSubscriptionId": "30c56c3a-54da-46ea-b004-06eb33432687",
"ScopeTags": [
{
"Name": "LightLoad"
Expand All @@ -87,7 +87,7 @@
"AzureResourceGroupName": "ContainerInsightsExtension-MediumLoad-Release",
"Location": "eastus2",
"InstanceOf": "ARC-Extension-ServiceResourceGroupDefinition",
"AzureSubscriptionId": "5fab7b6f-6150-42fe-89e1-0f07a0a9a46f",
"AzureSubscriptionId": "30c56c3a-54da-46ea-b004-06eb33432687",
"ScopeTags": [
{
"Name": "MediumLoad"
Expand All @@ -105,7 +105,7 @@
"AzureResourceGroupName": "ContainerInsightsExtension-HighLoad-Release",
"Location": "eastus2",
"InstanceOf": "ARC-Extension-ServiceResourceGroupDefinition",
"AzureSubscriptionId": "5fab7b6f-6150-42fe-89e1-0f07a0a9a46f",
"AzureSubscriptionId": "30c56c3a-54da-46ea-b004-06eb33432687",
"ScopeTags": [
{
"Name": "HighLoad"
Expand All @@ -123,7 +123,7 @@
"AzureResourceGroupName": "ContainerInsightsExtension-FF-Release",
"Location": "eastus2",
"InstanceOf": "ARC-Extension-ServiceResourceGroupDefinition",
"AzureSubscriptionId": "5fab7b6f-6150-42fe-89e1-0f07a0a9a46f",
"AzureSubscriptionId": "30c56c3a-54da-46ea-b004-06eb33432687",
"ScopeTags": [
{
"Name": "FF"
Expand All @@ -141,7 +141,7 @@
"AzureResourceGroupName": "ContainerInsightsExtension-MC-Release",
"Location": "eastus2",
"InstanceOf": "ARC-Extension-ServiceResourceGroupDefinition",
"AzureSubscriptionId": "5fab7b6f-6150-42fe-89e1-0f07a0a9a46f",
"AzureSubscriptionId": "30c56c3a-54da-46ea-b004-06eb33432687",
"ScopeTags": [
{
"Name": "MC"
Expand All @@ -156,4 +156,4 @@
]
}
]
}
}