Skip to content

Commit 4efa82f

Browse files
Update Deploy-AzureContainerAppJob-UpdateGrafana.ps1
1 parent f374a70 commit 4efa82f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/Deploy-AzureContainerAppJob-UpdateGrafana.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ $resourceGroup = $($env:AZURE_RESOURCE_GROUP_NAME)
4545
$environment = $($env:AZURE_CONTAINER_APPS_ENVIRONMENT_NAME)
4646
$jobName = $($env:AZURE_RESOURCE_UPDATE_GRAFANA_NAME)
4747
$loginServer = $($env:AZURE_CONTAINER_REGISTRY_ENDPOINT)
48+
$registryName = $($env:AZURE_CONTAINER_REGISTRY_NAME)
4849
$tag = "azd"
4950
$tag += "-$(Get-Date -Format 'yyyyMMddHHmmss')"
5051
$image = "$($env:AZURE_CONTAINER_REGISTRY_ENDPOINT)/copilot-usage-advanced-dashboard/update-grafana-job:$($tag)"
@@ -54,11 +55,12 @@ Write-Host "Resource Group: $resourceGroup" -ForegroundColor Green
5455
Write-Host "Environment: $environment" -ForegroundColor Green
5556
Write-Host "Job Name: $jobName" -ForegroundColor Green
5657
Write-Host "Login Server: $loginServer" -ForegroundColor Green
58+
Write-Host "Registry: $registryName" -ForegroundColor Green
5759
Write-Host "Image: $image" -ForegroundColor Green
5860
Write-Host "Project Directory: $projectDir" -ForegroundColor Green
5961

6062
Write-Host "Building and pushing Docker image using Azure Container Registry tasks..." -ForegroundColor Green
61-
az acr build --registry $loginServer --image $image --file "$projectDir/Dockerfile" "$projectDir"
63+
az acr build --registry $registryName --image $image --file "$projectDir/Dockerfile" "$projectDir"
6264
if ($LASTEXITCODE -ne 0) {
6365
Write-Host "ACR build failed" -ForegroundColor Red
6466
exit $LASTEXITCODE
@@ -87,4 +89,4 @@ Write-Host "Container App Job started successfully" -ForegroundColor Green
8789
$portalUrl = "https://portal.azure.com/#@$($env:AZURE_TENANT_ID)/resource$($env:AZURE_CONTAINER_APP_JOB_URL)"
8890

8991
Write-Host "You can view the Container App Job in the Azure Portal: " -ForegroundColor Green -NoNewline
90-
Write-Host "$portalUrl" -ForegroundColor Blue
92+
Write-Host "$portalUrl" -ForegroundColor Blue

0 commit comments

Comments
 (0)