title: Using Jenkins matrix project to build multiple instances of app with complex configs
body: <p>We're building (and running) our web app using Jenkins. Each of our clients has a dedicated instance of the app, with their own config (to talk to a particular DB server, reporting server, etc). I'm playing with different ways to set the config for each of these instances based on the "client" axis of the Jenkins project. So far I have come up with:</p>
  
  <ol>
  <li>Using the "Evaluated Groovy script" field to return a map of environment variables based on the client axis value (essentially a giant switch statement)</li>
  <li>Our app's CLI has a command for setting config values, so a script step could check the environment and run the appropriate config setting commands (again, big long switch)</li>
  <li>Using the client axis value as a filename to copy a preset config file from a folder of configs stored somewhere (so setting client to "client_a" would copy <code>$CONFIG_DIR/client_a.json</code> to the app's config folder inside the workspace.</li>
  </ol>
  
  <p>These all sound OK options to me, but I'm curious to hear:</p>
  
  <ul>
  <li>Whether storing the config values outside Jenkins (i.e. option 3) is preferable to dumping them all in the job itself</li>
  <li>Any other approaches that might be considered better practice.</li>
  </ul>