Skip to content

Commit

Permalink
Added additional output for troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
DCMattyG committed Aug 24, 2023
1 parent 83892df commit ee414bf
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/azure-ipam-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ee414bf

Please sign in to comment.