You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix issues of Publish-OSPlatformSolution with two step publishing (#140)
* Fix issue with using the Wait parameter that also enabled Two Step Publish and improve support for it
* Improve TwoStepMode switch name. Fix typo.
* Fix name of parameter in comments
* Add tests
* Improve tests
* Fix tests
* Fix tests
* Fix UseTwoStepMode parameter name in documentation and comments
@@ -89,6 +111,7 @@ function Publish-OSPlatformSolution
89
111
ExitCode=0
90
112
Message=''
91
113
}
114
+
92
115
}
93
116
94
117
process
@@ -107,13 +130,26 @@ function Publish-OSPlatformSolution
107
130
108
131
return$publishResult
109
132
}
133
+
134
+
# Check if StartSecondStep switch was enabled but UseTwoStepMode was not
135
+
if ( ($StartSecondStep-eq$true) -and ($UseTwoStepMode-eq$false) )
136
+
{
137
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 3-Message "Error in parameters provided. StartSecondStep enabled requires that UseTwoStepMode is also enabled"-Exception $_.Exception
138
+
WriteNonTerminalError -Message "Error in parameters provided"
139
+
140
+
$publishResult.Success=$false
141
+
$publishResult.ExitCode=-1
142
+
$publishResult.Message="Error in parameters provided"
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 3-Message "Error while starting to deploy the solution"-Exception $_.Exception
214
-
WriteNonTerminalError -Message "Error while starting to deploy the solution"
215
-
216
-
$publishResult.Success=$false
244
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 0-Message "First step of solution publish successfully completed. Will wait for second step to be be started in Service Center to finish deployment"
245
+
$publishResult.Message="First step of solution publish successfully completed. Will wait for second step to be be started in Service Center to finish deployment."
217
246
$publishResult.PublishId=$publishId
218
-
$publishResult.ExitCode=-1
219
-
$publishResult.Message="Error while starting to deploy the solution"
0 commit comments