Skip to content

Commit 3785d5f

Browse files
author
Brian Peterson (ECG)
committed
Revert "Deployment GUI fix for rerun"
This reverts commit 3833338.
1 parent 6b16349 commit 3785d5f

File tree

1 file changed

+45
-43
lines changed

1 file changed

+45
-43
lines changed

Deployment/asdk-installer.ps1

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

13021302
# Get environment details
13031303
# CloudBuilder
1304-
if (test-path "C:\CloudDeployment\Setup\InstallAzureStackPOC.ps1") {
1305-
if(!(test-path "C:\CloudDeployment\ECEngine\EnterpriseCloudEngine.psd1")){
1306-
# Deployment not initialized
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)){
13071319
$Script:Initialized="CloudBuilder_Install"
13081320
$syncHash.Control_Header_Tbl_Title.Text = $Text_Install.Mode_Title
13091321
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Install.Mode_LeftTitle
13101322
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Install.Mode_LeftContent
13111323
}
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
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){
13361340
$Script:Initialized="CloudBuilder_Rerun"
13371341
$syncHash.Control_Header_Tbl_Title.Text = $Text_Rerun.Mode_Title
13381342
$syncHash.Control_Mode_Tbl_LeftTitle.Text = $Text_Rerun.Mode_LeftTitle
13391343
$syncHash.Control_Mode_Tbl_LeftContent.Text = $Text_Rerun.Mode_LeftContent
1340-
}
1341-
# Deployed with deployment UI
1342-
else {
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
13501344
}
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
1345+
# Contains 2 or more deplployment logs
1346+
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
13571351
}
13581352
}
13591353
}
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+
13621364
# Reboot options
13631365
F_Reboot_Options
13641366
$syncHash.Control_Mode_Tbl_RightTitle.Text = $Text_Install.Mode_RightTitle

0 commit comments

Comments
 (0)