Errors in deploy deployments when SFTPing step template scripts for Linux hosts

Hi there,

I’m attempting to automate deployment to a CentOS 6 server, as part of the deployment process flow I would like to announce the deployment to a HipChat room and as such have created a simple bash step template for this (as detailed in the screen shot).

It looks like when this step is being processed as part of the deployment the script is being sent to the server but maybe some high level of debug is enabled and is generating errors in the deployment task log. While I’m using curl to communicate with the HipChat server I have confirmed that there is no output from my bash script.

Any ideas whats up?

Turns out this is output from cURL, adding the -s parameter to the curl call silenced it and the octopus deploy tasks don’t error any more.

Hi Tim,
Great to hear that you are having a play around with the new SSH support in 3.0, we hope it comes in handy!

It looks as though you don’t have the script correctly formatted. The logs you have highlighted are coming from curl itself, probably because the variables you are passing through it haven’t been populated correctly. Remember the code gets sent over and executed as a bash script so to get access to variables there is a slightly different format than with PowerShell or C#. Check out the Variables section of our SSH doocumentation for more details.

For example, In the screenshot below the OD variable can be set to a local variable, or used directly by using the get_octopusvariable function that is available to any scripts running through Calamari.
Try update your script to take advantage of this function and let me know of the outcome.

Thanks again,

Hi again Tim,
I have tested with the string replacement method in your code and looks like it works too! Calamari is doing the string replacement beforehand.
That adds one more mechanism that’s available to users!
Thanks again, seems we have both learnt something new.

Thanks for the prompt reply! Epic support :slight_smile: