Closed snemetz closed 6 years ago
Unfortunately, there isn't a good way to do this in a single build yet because orb processing all happens prior to the runtime, so by the time you're inside a job the orb elements have already been resolved into "regular" config. You could structure your orb to write data to workspaces if you want to share them across jobs, but there isn't yet a way to have the parameter values themselves be driven by an upstream job in the same build. As it's written, orb-tools isn't very suitable for the thing your'e trying to do, so you may need to write some customer machinery to dynamically create the orbs themselves and then do the publishing from your code. We'd happily take a look at what you come up with if you find a nice solution. We have some medium-term plans to improve the dynamism at build time, but that's still a ways out for people building orbs today.
Trying to figure out how to pass dynamically generated variable into an orb
So far I know I can have a job to generate the variable then persist it to the workspace. Using pre-steps and can read the variable The question is what to do with it after that. Ideally I'd like it to be able to use the orb's parameters versus the orb being hardcoded to this. Only options I've figured out so far is to use $BASH_ENV or code stuff in the orb to expect getting variables from the workspace. Haven't figured out yet, if parameter vs $BASH_ENV precedence yet.
Is there nay other way to do this? If not, please add to the requests list.
Example I'm trying to extend orb-tools to be more complete. Plan is to parse the repo name to get the orb name, create the orb in the registry if it doesn't exist, then pass the orb name to the other orb-tools jobs