Skip to content

Commit dce3950

Browse files
Merge pull request #283 from BrianLPeterson/user/bpet/guifixonly
Deployment GUI fix for rerun
2 parents 3785d5f + c8f6ab5 commit dce3950

File tree

1 file changed

+43
-45
lines changed

1 file changed

+43
-45
lines changed

Deployment/asdk-installer.ps1

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,66 +1301,64 @@ Write-Host "." -NoNewline -ForegroundColor Cyan
13011301

13021302
# Get environment details
13031303
# CloudBuilder
1304-
if (test-path "C:\CloudDeployment\Setup\InstallAzureStackPOC.ps1") {
1305-
1306-
if(!(test-path "C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1")){
1307-
# Deployment not initialized
1308-
$Script:Initialized="CloudBuilder_Install"
1309-
$syncHash.Control_Header_Tbl_Title.Text = $Text_Install.Mode_Title
1310-
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Install.Mode_LeftTitle
1311-
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Install.Mode_LeftContent
1312-
}
1313-
else{
1314-
# Import module to check current deployment status
1315-
Import-Module "C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1" -Force -Verbose:$false
1316-
$actionProgress = Get-ActionProgress -ActionType Deployment
1317-
# Deployment not started
1318-
if (!($actionProgress)){
1304+
if (test-path "C:\CloudDeployment\Setup\InstallAzureStackPOC.ps1") {
1305+
if(!(test-path "C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1")){
1306+
# Deployment not initialized
13191307
$Script:Initialized="CloudBuilder_Install"
13201308
$syncHash.Control_Header_Tbl_Title.Text = $Text_Install.Mode_Title
13211309
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Install.Mode_LeftTitle
13221310
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Install.Mode_LeftContent
13231311
}
1324-
# Deployment in progress
1325-
elseif($actionProgress.LastAttribute.Value -eq 'InProgress'){
1326-
# Not deployed with deployment UI
1327-
if(!(test-path "C:\CloudDeployment\Rerun\config.xml")){
1328-
New-Item C:\CloudDeployment\Rerun -type directory -Force
1329-
'<config status="rerun" run="0"/>' | Out-File C:\CloudDeployment\Rerun\config.xml
1330-
$Script:Initialized="CloudBuilder_Rerun"
1331-
$syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title
1332-
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle
1333-
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent
1334-
}
1335-
# Deployed with deployment UI
1336-
else {
1337-
$Status = [XML](Get-Content "C:\CloudDeployment\Rerun\config.xml")
1338-
# Contains only 1 or 2 deployment logs
1339-
if ($status.config.status -eq "Rerun" -and [int]$status.config.run -le 2){
1312+
else{
1313+
# Import module to check current deployment status
1314+
Import-Module "C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1" -Force -Verbose:$false
1315+
$actionProgress = Get-ActionProgress -ActionType Deployment
1316+
# Deployment not started
1317+
if (!($actionProgress)){
1318+
$Script:Initialized="CloudBuilder_Install"
1319+
$syncHash.Control_Header_Tbl_Title.Text = $Text_Install.Mode_Title
1320+
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Install.Mode_LeftTitle
1321+
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Install.Mode_LeftContent
1322+
}
1323+
# Deployment completed successfully
1324+
elseif($actionProgress.Attribute("Status").Value -eq 'Success'){
1325+
$Script:Initialized="CloudBuilder_Completed_GatherLogs"
1326+
$syncHash.Control_Header_Tbl_Title.Text = $Text_Completed.Mode_Title
1327+
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Completed.Mode_LeftTitle
1328+
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Completed.Mode_LeftContent
1329+
}
1330+
# Deployment in progress or stopped
1331+
else{
1332+
# Not deployed with deployment UI
1333+
if(!(test-path "C:\CloudDeployment\Rerun\config.xml")){
1334+
New-Item C:\CloudDeployment\Rerun -type directory -Force
1335+
'<config status="rerun" run="0"/>' | Out-File C:\CloudDeployment\Rerun\config.xml
13401336
$Script:Initialized="CloudBuilder_Rerun"
13411337
$syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title
13421338
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle
13431339
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent
1344-
}
1345-
# Contains 2 or more deplployment logs
1340+
}
1341+
# Deployed with deployment UI
13461342
else {
1347-
$Script:Initialized="CloudBuilder_Rerun_GatherLogs"
1348-
$syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title_Logs
1349-
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle_Logs
1350-
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent_Logs
1343+
$Status = [XML](Get-Content "C:\CloudDeployment\Rerun\config.xml")
1344+
# Contains only 1 or 2 deployment logs
1345+
if ($status.config.status -eq "Rerun" -and [int]$status.config.run -le 2){
1346+
$Script:Initialized="CloudBuilder_Rerun"
1347+
$syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title
1348+
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle
1349+
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent
1350+
}
1351+
# Contains 2 or more deployment logs
1352+
else {
1353+
$Script:Initialized="CloudBuilder_Rerun_GatherLogs"
1354+
$syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title_Logs
1355+
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle_Logs
1356+
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent_Logs
13511357
}
13521358
}
13531359
}
1354-
else{
1355-
# Deployment completed
1356-
$Script:Initialized="CloudBuilder_Completed_GatherLogs"
1357-
$syncHash.Control_Header_Tbl_Title.Text = $Text_Completed.Mode_Title
1358-
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Completed.Mode_LeftTitle
1359-
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Completed.Mode_LeftContent
13601360
}
13611361

1362-
}
1363-
13641362
# Reboot options
13651363
F_Reboot_Options
13661364
$syncHash.Control_Mode_Tbl_RightTitle.Text = $Text_Install.Mode_RightTitle

0 commit comments

Comments
 (0)