title: Openshift CLI - update Application with template and oc new-app
body: <p>I am currently building and deploying an Application with a template using</p>
  <pre><code>oc new-app -f ./openshift/template.yaml
  </code></pre>
  <p>I am using a template and not separate Deployment-, Build-, etc. configs because I also want to be able to pass parameters like</p>
  <pre><code>oc new-app -f ./openshift/template.yaml --p DATABASE_PW=PW
  </code></pre>
  <p>To my knowledge this is not possible using</p>
  <pre><code>oc create -f ./openshift/deploymentconfig.yaml --p SOME_PARAM=TEST
  </code></pre>
  <p>Now I have also integrated this is in a Build Pipeline with Jenkins. My problem is now this. This all works fine on the first deployment, but it will not work for a redployment. I can either just rebuild the app  with Jenkins like</p>
  <pre><code>oc start-build my-app
  </code></pre>
  <p>But this will cause that changes is my Template will not be considered. I also cannot use new-app as it does not replace existing configs producing an error similar to this</p>
  <pre><code>--&gt; Creating resources ...
      error: services &quot;my-app&quot; already exists
      ....
  --&gt; Failed
  </code></pre>
  <p>Is there a way to solve this problem? Maybe something like a <code>new-app replace</code> command where all the configs are being replaced? I am currently solving this by killing the app completely using a shell file and then bringing it up again; but that will always cause a downtime of a few minutes which really bothers me.</p>