Octopus - Running EXE in interactive mode

eldadcohenil's Avatar

eldadcohenil

01 Nov, 2017 07:02 AM

Hi,

1. Can you please describe to me if there is a method to run EXE file that has interactive console output ?
2. How Can I point with a variable to the folder where my zip package was deployed. , I tried using Octopus.Tentacle.CurrentDeployment.PackageFilePath buy it gave me empty value , Am I on the right direction ?

Thanks In Advanced,

  1. Support Staff 1 Posted by Alex Rolley on 03 Nov, 2017 04:33 AM

    Alex Rolley's Avatar

    Hi,

    Thanks for getting in touch!

    For your first question, it depends on if you require any feedback from the interactive input. Octopus can't launch the exe natively, however once the package has been extracted you can call the exe via a Powershell script or a batch file. We have seen cases where you have to run the Tentacle process as a user account for this to work correctly. To do this you will need to stop the Tentacle service then launch Tentacle.exe manually (via c:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe).

    As for your second question, you were in the right neighbourhood. The variable that you need should be Octopus.Action[_name_].Output.Package.InstallationDirectoryPath, where _name_ needs to be replaced with the name of your deployment step.

    I hope that helps, please let me know if you have any other questions,

    Regards,

    Alex

  2. 2 Posted by eldadcohenil on 04 Nov, 2017 08:46 PM

    eldadcohenil's Avatar

    Hi,

    Thanks for the answer.
    So To summarized section answer for question #1.
    I need to create a PS or batch file on the target machine in ordr to run interactvily exe file.

    Thanks

  3. Support Staff 3 Posted by Alex Rolley on 06 Nov, 2017 02:57 AM

    Alex Rolley's Avatar

    Hi,

    That is correct, especially if you are waiting on that executable to finish before finishing the deployment. If you only need to launch the executable as part of your deployment that is possible using a script step within Octopus, although you may need to modify the user that the Tentacles is running as to allow the executable to launch correctly.

    Regards,
    Alex

  4. 4 Posted by eldadcohenil on 06 Nov, 2017 08:53 AM

    eldadcohenil's Avatar

    OK. Thanks for the answer.

  5. Support Staff 5 Posted by Alex Rolley on 06 Nov, 2017 11:50 PM

    Alex Rolley's Avatar

    No problems, happy to help!

    Regards,
    Alex

  6. 6 Posted by eldadcohenil on 10 Nov, 2017 06:21 AM

    eldadcohenil's Avatar

    launching Tentacle.exe manually resolved the issue

  7. Support Staff 7 Posted by Alex Rolley on 12 Nov, 2017 11:14 PM

    Alex Rolley's Avatar

    Hi,

    Thanks for letting me know that the issue has been resolved! Please let me know if there is anything else that we can assist with.

    Happy deploying!

    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