Octopus 3.17.8 - Robocopy is not working - Powershell scripts fails

satdors's Avatar

satdors

08 Nov, 2017 09:37 AM

Hi There,

Recently I have upgraded Octopus to latest 3.17.8 and for some reason, powershell specific process steps are not executing correctly returns with non-0, i had a simple backup step which copies using robocopy files from one location to other. this step does copy most of the files, but failes at the end with exit code1 , there is no clear message anywhere why it is returning exiting with 1. Please help, earlier version it was working perfectly fine

I am using Windows 10- and also i enabled powershell script by opening powershell editor on my machine and set to unrestricted- i did execute many powershell scripts directly without any issue, only through octopus deploy, they are failing , please advise as just taking long to get bottom of this.

thanks
sat

  1. Support Staff 1 Posted by Alex Rolley on 09 Nov, 2017 04:17 AM

    Alex Rolley's Avatar

    Hi,

    Thanks for getting in touch! Sorry to hear that you are having issues with your deployments.

    As you are using Windows 10, which is not one our our supported operating systems, I am limited in the amount of support that I am able to give. If possible can you please execute your script against a Server OS that we support and advise if it has the same issue?

    Having said that, are you able to export the raw task log of the task that fails so that I can investigate what might be going wrong? My initial suspicion is that the account that your Octopus Tentacle is running under doesn't have the required permissions to operate correctly, are you able to test this by changing the user that your Tentacle is running as to the account that you have tested your script with externally?

    It's also possible that the error code is not returning correctly when Powershell is executed via Octopus. If you have a read of this post it shows you how to correctly return powershell exit codes in different contexts.

    I hope this helps, please let me know if there is anything else that I can do to assist.

    Regards,
    Alex

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac