Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Powershell script in Script Repository - can I write to/create BuildMaster variable to use in another function?



  • I want to be able to set a BuildMaster variable value from a Powershell script that I can then use elsewhere in a non-Powershell function? This would all be within the same Deployment of course.

    Product: BuildMaster
    Version: 4.8.6



  • This cannot be done currently, the supported way is via a custom action.



  • What about in another PowerShell script?

    For example, if I have a powershell script to check for something to exist and it returns true or false, can I then call that script in the variable space like $DoesThisExist($thing), so that that other script could then know if that thing exists or not.
    I know I can put that check in that same script but then I have to duplicate the check portion all over the place which is really not the better thing to do in coding.
    And since you don't seem to support calling functions within powershell scripts I have to then dupe code in order to store it in the script repository.



  • In the v5 plans (which we will ship in 4.9), you can have "output variables" from your powershell scripts. But currently, you can't communicate back to the BuildMAster execution engine via a script with anything but exit codes.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation