you can pass custom variables to pipe line using API call to
Ideally there should not be any 2 different build process for stage and
prod . For dispatcher you might need to maintain apache system variables
unique to environments. But the dispatcher code needs to be same on
stage and production.