Added additional output for troubleshooting

This commit is contained in:
Matthew Garrett 2023-08-23 21:51:07 -07:00
Родитель 83892df987
Коммит ee414bf8d8
1 изменённых файлов: 15 добавлений и 3 удалений

18
.github/workflows/azure-ipam-testing.yml поставляемый
Просмотреть файл

@ -69,11 +69,20 @@ jobs:
- name: Update Docker-Compose YAML
shell: pwsh
run: |
$uiContainer = "$env:ACR_NAME.azurecr.io/ipam-ui:${{ github.run_id }}-${{ github.run_attempt }}"
$engineContainer = "$env:ACR_NAME.azurecr.io/ipam-engine:${{ github.run_id }}-${{ github.run_attempt }}"
$lbContainer = "$env:ACR_NAME.azurecr.io/ipam-lb:${{ github.run_id }}-${{ github.run_attempt }}"
$composeFile = Get-Content -Path ./docker-compose.prod.yml
$composeYaml = $composeFile | ConvertFrom-Yaml
$composeYaml['services']['ipam-ui'].image = "$env:ACR_NAME.azurecr.io/ipam-ui:${{ github.run_id }}-${{ github.run_attempt }}"
$composeYaml['services']['ipam-engine'].image = "$env:ACR_NAME.azurecr.io/ipam-engine:${{ github.run_id }}-${{ github.run_attempt }}"
$composeYaml['services']['nginx-proxy'].image = "$env:ACR_NAME.azurecr.io/ipam-lb:${{ github.run_id }}-${{ github.run_attempt }}"
$composeYaml['services']['ipam-ui'].image = $uiContainer
$composeYaml['services']['ipam-engine'].image = $engineContainer
$composeYaml['services']['nginx-proxy'].image = $lbContainer
Get-ChildItem
$composeYaml | ConvertTo-Yaml
$composeYaml | ConvertTo-Yaml | Out-File -Path ./docker-compose-prod.yml
- name: Deploy Azure IPAM
@ -177,10 +186,13 @@ jobs:
run: |
$tenantId = (Get-AzContext).Tenant.Id
$scope = "/providers/Microsoft.Management/managementGroups/$TenantId"
$uiApp = Get-AzADApplication -ApplicationId ${{ needs.deploy.outputs.ipamUIAppId }}
$engineApp = Get-AzADApplication -ApplicationId ${{ needs.deploy.outputs.ipamEngineAppId }}
Remove-AzResourceGroup -Name ${{ needs.deploy.outputs.ipamResourceGroup }} -Force
Remove-AzRoleAssignment -ObjectId $engineApp.ObjectId -Scope $scope -RoleDefinitionName Reader
$uiApp | Remove-AzADApplication
$engineApp | Remove-AzADApplication