Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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?

    Scheduled Pinned Locked Moved Support
    buildmastervariablespowershell
    4 Posts 2 Posters 25 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jstarbird_7831
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            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.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation