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 withkey = <variable name>, value = <variable value>
Problem is, I don't know variable name ahead of time. -
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
@BuildVariablesthat is just a list of the variables you're creating. Then you can use$BuildVariable(name)to get the value.Hope that helps,
Alana
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