Offline and Included Script Modules

I have a project which I use for normal (online) environments. It has TWO included script modules - I’ll call them script1.ps1 and script2.ps1 for the purposes of this discussion.

When I deploy a release for an online environment my entire deployment works with no issues. both script1 and script2 are called as part of two separate steps in the project.

However when I create an offline deployment neither script1.ps1 or script2.ps1 are copied to the ‘scripts’ folder and instead all that is there is the call itself.

So just to clarify say Script1.ps1 had a function like this (not real function lol)

function Create-Database
$envName = “Online”

Write-Output Yay i'm running


And then in a step in my call I have the following script

Create-Database -serviceName $ServiceName -$envName $EnvName

Where $ServiceName and $EnvName are octopus variables

Then what I get in my offline project is a file called Script1.ps1 under the scripts folder with just this in it

Create-Database -serviceName $ServiceName -$envName $EnvName

But the actual code (i.e. function Create-Database etc.) is not there?!?

Any clues as to why

Hi Mark,

Sorry to hear that you are having this issue.

So that we can try and work out what has gone wrong are you able to export and attach the deployment logs for both a successful internal deployment, as well as one to an offline drop? If you can also let me know which version of Octopus you are using that would be greatly appreciated so that I can set up a matching test environment.

It would be useful if you can enable variable evaluation for the logs as it will give us the maximum available information.

Thanks Mark, hopefully we can get to the bottom of this quickly for you.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.