Good morning. I’m following along with the Conditional variables help located here: https://octopus.com/docs/reference/variable-substitution-syntax#VariableSubstitutionSyntax-Conditionalsconditionals
What I want to do is set a Binding on a website deployment to Enabled=false if a variable does not exist. Following the help document I thought that this should work for the ‘Enabled’ expression: #{if ClientRenewalSummary-Website Host Name 2}true#{/if}.
When I use this I get the following error on deployment. What am I doing incorrectly?
Thank you,
Kevin
System.FormatException: String was not recognized as a valid Boolean.
at System.Boolean.Parse(String value)
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at Calamari.Deployment.Features.IisWebSiteBeforeDeployFeature.EnsureCertificatesUsedInBindingsAreInStore(VariableDictionary variables) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\Features\IisWebSiteBeforeDeployFeature.cs:line 32
at Calamari.Deployment.Features.IisWebSiteBeforeDeployFeature.Execute(RunningDeployment deployment) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\Features\IisWebSiteBeforeDeployFeature.cs:line 22
at Calamari.Deployment.Conventions.FeatureConventionBase.Run(RunningDeployment deployment) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\Conventions\FeatureConvention.cs:line 82
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60
at Calamari.Deployment.ConventionProcessor.RunConventions() in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 28
Running rollback conventions...
String was not recognized as a valid Boolean.
System.FormatException
at System.Boolean.Parse(String value)
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at Calamari.Deployment.Features.IisWebSiteBeforeDeployFeature.EnsureCertificatesUsedInBindingsAreInStore(VariableDictionary variables) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\Features\IisWebSiteBeforeDeployFeature.cs:line 32
at Calamari.Deployment.Features.IisWebSiteBeforeDeployFeature.Execute(RunningDeployment deployment) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\Features\IisWebSiteBeforeDeployFeature.cs:line 22
at Calamari.Deployment.Conventions.FeatureConventionBase.Run(RunningDeployment deployment) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\Conventions\FeatureConvention.cs:line 82
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60
at Calamari.Deployment.ConventionProcessor.RunConventions() in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 50
at Calamari.Commands.DeployPackageCommand.Execute(String[] commandLineArguments) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Commands\DeployPackageCommand.cs:line 120
at Calamari.Program.Execute(String[] args) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Program.cs:line 45
The remote script failed with exit code 100
Website - Client Renewal Summary on XXX