title: Best practice to build a CD pipeline to deploy application to different environments
body: <p>Currently I'm trying to build a CD pipeline for our application, which is a typical <code>Maven J2EE</code> project and we'll deploy a war to <code>Tomcat</code> container.</p>
  
  <p>Our plan for the CD pipeline looks like this:</p>
  
  <pre><code>CI(Run UT and build the WAR) -&gt; Deploy to DEV -&gt; Deploy to SIT -&gt; Deploy UAT -&gt; Deploy PROD
  </code></pre>
  
  <p>To follow the best practices of CD, we only build the binary(war) once in the CI phase, but we have some configuration files which are different for each environment, so what's the best way to put the related configuration files for each environment during the deployment phase?</p>
  
  <p>We're using <code>Jenkins and the build-pipe-line plugin</code> to build the <code>pipeline</code>, are there any recommended plugins to make this happen?  </p>
  
  <p>Thanks.</p>