<p>We are developing an web application which had a multiple micro-services in same repository.</p>

<p>For our existing monolithic application, we are deploying our application to Kubernetes using Helm and Jenkins. When micro-services in question, we are struggling to define our CI/CD Pipeline strategies. Belows are the unclear issues:</p>

<ul>
<li><p>For monolithic application I have one Dockerfile, one Jenkinsfile and one Helm Chart. For building stage I am building image/s using following command.</p>

<pre><code>docker.build("registry/myrepo/image:${env.BUILD_NUMBER}"
</code></pre></li>
<li><p>For monolithic application, I have one chart with multiple values.yaml such as values.dev.yaml, values.prod.yaml which I configured for multiple environments.</p></li>
</ul>

<p>So our questions are;</p>

<p>1.How should we build and push multiple containers for multiple Dockerfiles in Jenkinsfile for micro-services? At the present every micro-services have their own Dockerfiles in their own root.</p>

<p>2.Is that possible for Jenkins to distinguish the micro-services that we would like to deploy? I mean,sometimes probably we made some changes only for specific service and we would like to deploy this changes. So should we organize independent pipeline or is there any way to handle this same pipeline?</p>

<p>3.How should we organize our Helm chart to deploy micro-services Kubernetes? Should we create multiple charts per services or create multiple templates that refers only one values.yaml? </p>

semural
<p>Looks like you are almost there.</p>

<ol>
<li>Have separate pipelines for micro services, this would build, verify and deploy docker images to a docker registry. Have a separate pipeline for verifying and deploying the whole stack using helm.</li>
<li>I assume you would be using git events to identify the changes? When there is change in a microservice, I assume it would be committed to a single repository. This would trigger a git event using which you can trigger the pipeline of the respective microservice.</li>
<li>As the helm represents your whole application stack,  I would suggest to have it as a single chart. If the complexity of the micro service is getting increased split it as subcharts.</li>
</ol>

<p>Multiple charts can be a future maturity level when teams associated with each microservice can deploy the upgrades independently without affecting availability of the whole stack.</p>
