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!

Buildmaster - Get all build variables



  • Is there any way, I can retrieve all build variables and loop through it in one of the otterscript I am executing in my pipeline?
    I am asking because I am creating a release and build using an API and my build variables varies based on what kind of deployment it is.
    I need to grab all the variables dynamically and create a nested json with key = <variable name>, value = <variable value>
    Problem is, I don't know variable name ahead of time.


  • inedo-engineer

    Hi @andy222

    I'm afraid we don't have that capability in OtterScript, and it would require a new variable function to do that. You might be able to add that in an extension, or we could add it as well.. but we have a few things we want to finish first on our BuildMaster 2024 roadmap.

    Since you're creating build variables using the API, I wonder if you could just create a variable called @BuildVariables that is just a list of the variables you're creating. Then you can use $BuildVariable(name) to get the value.

    Hope that helps,
    Alana


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation