continuous-integrationoctopus-deploy

In Octopus, is it possible to upload a file to Octopus and then copy that to a file location in the target machine?


I want make a file(.pfx in this case) available in a target file location (ie /etc/myFolder) before a particular Octopus process step runs. Trying to use "Run a Script" step with a Bash script as my target is a Linux machine.

Is it possible to upload this file(.pfx) to Octopus and then refer that via a variable in the bash script and copy it into my target folder.


Solution

  • Managed to achieve this by,

    And, following Bash script in "Run a script" process step did the copying of myCert.pfx content into the target location.

    original=$(get_octopusvariable "var1.RawOriginal")
    echo $original | base64 -d > "/etc/myFolder/myCert.pfx"
    

    Useful links: https://octopus.com/docs/projects/variables/certificate-variables