Service Fabric Application Deployment Task fails because of missing default value
See original GitHub issueEnvironment
- Server - VSTS
- Agent - VS2017 Hosted
Issue Description
Service Fabric Application Deployment v.1.4.1 fails with this error (the full error is below):
##[error]Exception calling "Parse" with "1" argument(s): "String was not recognized as a valid Boolean."
Further analysis in debug mode points to line 36 in deploy.ps1:
$configureDockerSettings = [System.Boolean]::Parse((Get-VstsInput -Name configureDockerSettings))
It seems that the default value isn’t set in my build definition, which I created yesterday with version 1.3.11. A workaround is to make a change to the Build Definition and save it, which adds these params to the build definition:
"configureDockerSettings": "false",
"registryCredentials": "AzureResourceManagerEndpoint",
"dockerRegistryEndpoint": "",
"azureSubscriptionEndpoint": "",
"registryUserName": "",
"registryPassword": "",
"passwordEncrypted": "true"
Error logs
2017-10-12T19:49:28.9401893Z ##[debug]Leaving D:\a_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.4.1\deploy.ps1.
2017-10-12T19:49:28.9842309Z ##[debug]Caught exception from task script.
2017-10-12T19:49:28.9872083Z ##[debug]Error record:
2017-10-12T19:49:29.0392219Z ##[debug]D:\a_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.4.1\deploy.ps1 : Exception calling “Parse” with “1” argument(s): “String was not recognized as a valid Boolean.”
2017-10-12T19:49:29.0402233Z ##[debug]At line:1 char:1
2017-10-12T19:49:29.0412228Z ##[debug]+ . 'd:\a_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c …
2017-10-12T19:49:29.0422233Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-10-12T19:49:29.0432231Z ##[debug] + CategoryInfo : NotSpecified: (😃 [deploy.ps1], MethodInvocationException
2017-10-12T19:49:29.0442235Z ##[debug] + FullyQualifiedErrorId : FormatException,deploy.ps1
2017-10-12T19:49:29.0462233Z ##[debug]
2017-10-12T19:49:29.0902339Z ##[debug]Script stack trace:
2017-10-12T19:49:29.0942351Z ##[debug]at <ScriptBlock>, D:\a_tasks\ServiceFabricDeploy_c6650aa0-185b-11e6-a47d-df93e7a34c64\1.4.1\deploy.ps1: line 36
2017-10-12T19:49:29.0942351Z ##[debug]at <ScriptBlock>, <No file>: line 1
2017-10-12T19:49:29.0962367Z ##[debug]at <ScriptBlock>, <No file>: line 22
2017-10-12T19:49:29.0972368Z ##[debug]at <ScriptBlock>, <No file>: line 18
2017-10-12T19:49:29.0982378Z ##[debug]at <ScriptBlock>, <No file>: line 1
2017-10-12T19:49:29.0992386Z ##[debug]Exception:
2017-10-12T19:49:29.1032431Z ##[debug]System.Management.Automation.MethodInvocationException: Exception calling “Parse” with “1” argument(s): “String was not recognized as a valid Boolean.” —> System.FormatException: String was not recognized as a valid Boolean.
2017-10-12T19:49:29.1042402Z ##[debug] at System.Boolean.Parse(String value)
2017-10-12T19:49:29.1052400Z ##[debug] at CallSite.Target(Closure , CallSite , Type , Object )
2017-10-12T19:49:29.1062404Z ##[debug] — End of inner exception stack trace —
2017-10-12T19:49:29.1072413Z ##[debug] at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
2017-10-12T19:49:29.1082409Z ##[debug] at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) 2017-10-12T19:49:29.1092412Z ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2017-10-12T19:49:29.1102416Z ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2017-10-12T19:49:29.1112425Z ##[debug] at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) 2017-10-12T19:49:29.1122421Z ##[debug] at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) 2017-10-12T19:49:29.1132428Z ##[debug] at System.Management.Automation.PSScriptCmdlet.RunClause(Action
1 clause, Object dollarUnderbar, Object inputToProcess)
2017-10-12T19:49:29.1142426Z ##[debug] at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
2017-10-12T19:49:29.1152438Z ##[debug] at System.Management.Automation.CommandProcessorBase.Complete()
2017-10-12T19:49:29.1372485Z ##[error]Exception calling “Parse” with “1” argument(s): “String was not recognized as a valid Boolean.”
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (4 by maintainers)
Top GitHub Comments
No it has not been fixed yet. While we are in the progress, you can unblock yourself by using the workaround in the original post - Check and uncheck “Configure docker settings” check box under “Docker settings” group in release/build definition
Thanks for reporting it. We are trying to hot-fix it.