Octopus Version: 188.8.131.52
For the last 3-4 days octopus seems to have stopped loading Script Modules. I’ve created a module called “Test” that contains the default “Say-Hello” function and i get this error:
say-hello : The term 'say-hello' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
I can see the module supposedly added on the Process tab
Available script modules: test, configure…
This is happening with old and new script modules.
We have another environment with 2.5+ which is not experiencing this issue. 184.108.40.206 was working fine last week though.
No strange logs on the viewer have been found.
If you guys need data from RavenDB for troubleshooting please let me know.
Thanks for getting in touch! Is it possible at all your 2.4.7 tentacles have been upgraded or had changes made (inside windows).
If you haven’t upgraded Octopus in this time, it makes no sense they are just failing. We did have one user on their environment have this ‘say-hello’ issue, and when calling the script adding a line break at the end was all that was needed to correctly call the function. We determined it to be an issue with PowerShell behaving badly. (It would also cache when it detected no changes).
Are all of your script function calls a single line PowerShell?
Are also all of your errors exactly the same as the one below?
Please let me know what you find.
I upgraded the tentacle and it started working again. I didnt need to modify the script module or the powershell script step at all.
Thx again Vanessa
Hi Support team,
I don’t have proper documentation on how script module should look like and how to refer it project deployment steps.
Please help me.
Thanks for getting in touch! Our documentation is clearly lacking in this area. I have put a task in to make sure we add some.
But let’s see if I can explain this well enough.
If you go to the following post http://octopusdeploy.com/blog/2.4 There is a section about Script Modules.
It is designed for times when you have a PowerShell function that you want to reuse in either multiple steps in a project, or multiple projects with one base place to manage the code.
However what is not explicitly mentioned in the blog post, is it is included as part of each step when it is included as part of a project, so it should really only contain functions and not code that would run on each step.
Let me know if you need any further clarification or have any questions.