I want to use enviornment variables per stage (dev, acc, prod). Now I have added this list above my pipeline:
variables: [
a : [
dev: b
acc: c
prod: d
]
]
and in my pipeline I added:
VAR = variables.get(‘a’).get(env.STAGE)
I really want to get rid of the variables list above my pipeline, but I still want to be able to get a different variable for dev than for acc for example. Any help is welcome.
I tried looking for plugins that solved this issue for me, but I couldn’t find any.