I have a project where I need to set an environment variable based on a choice parameter the user chooses. Each project has a theme project dependency. I'd like to have the user choose the project and then load the theme name from a property file. Something like
proj1=theme1
proj2=theme2
proj3=theme3
If the user chooses proj1
from the PROJECT_NAME
choice parameter, I want to automatically set THEME_NAME
to be theme1
. What would be the best way to go about this?
I don't want to modify the Jenkins job config whenever a new project is added. Instead, I want to have the mapping in a file so I can have it in version control.