Hi there,
We’ve been using the Community Library Step Template Slack - Notify Deployment for a while now.
The template has a checkbox for including the machine name. We left it unchecked.
All works like a charm!
However, when dry testing the template by going to Library, Step Templates, selecting the template, press Run
, fill in the same values that are used in our process step and leaving the Include machine name
checkbox unchecked, the script fails.
What the script does on line 23 is $IncludeMachineName = [boolean]::Parse($OctopusParameters['IncludeMachineName']);
The script fails with the following error:
Exception calling "Parse" with "1" argument(s): "String was not recognized as a
January 20th 2017 21:12:44Error
valid Boolean."
January 20th 2017 21:12:44Error
At C:\Octopus\Work\20170120201242-158\Script.ps1:23 char:1
January 20th 2017 21:12:44Error
+ $IncludeMachineName = [boolean]::Parse($OctopusParameters['IncludeMachineName
January 20th 2017 21:12:44Error
']) ...
January 20th 2017 21:12:44Error
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
January 20th 2017 21:12:44Error
~~~
January 20th 2017 21:12:44Error
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordE
January 20th 2017 21:12:44Error
xception
January 20th 2017 21:12:44Error
+ FullyQualifiedErrorId : FormatException
January 20th 2017 21:12:44Error
January 20th 2017 21:12:44Info
Exit code: 1
January 20th 2017 21:12:44Fatal
The remote script failed with exit code 1
Since the same settings work during deployment, I think it’s not an issue with the template itself.
Kind regards,
Emiel