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!

    Retrieve Action Group Server Assignment From Child Action

    Scheduled Pinned Locked Moved Support
    variablesbuildmasterservers
    4 Posts 1 Posters 11 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.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Is there any way to retrieve the Server Name of the parent Action Group if the assigned server to a child task is different? For example, if I assign a child task to Server B, the $ServerName variable will have a value of Server B since that is currently scoped. However, if the parent Action Group has an assignment of Server A, I would like to be able to retrieve that server assignment. Is there any way to accomplish that?

      Product: BuildMaster
      Version: 4.4.2

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

        There's no direct way to do this yet (perhaps we can add a system variable or something in the future), however you can work around this by adding an action group above the one you want to name that uses a Set Variable Value action with the configuration: Set $ActionGroupServerName = YourGroup.

        Then, you can assign your existing action group to the server $ActionGroupServerName (i.e. a variable server), and you will be able to access $ActionGroupServerName within that group to get the name of the action group's server.

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

          Similar to what you said, I can use the first step in the Action Group to set a different variable to the value in $ServerName, which should give me the name of the Action Group scoped server. Is the $ServerName variable scoped within each Action Group? For example, if I have Action Groups executing in parallel, is it guaranteed that the $ServerName variable will be scoped within each individual Action Group and there will not be any crossover of this variable? If not, I would likely have to use a different variable name for each Action Group where I need this functionality.

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

            When run in parallel, there is no guarantee with the ordering the value is set (and the change would be observed in different groups), so you'd have to create separate variables in each group if you have multiple action groups using different server groups.

            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