<p>I am trying to use Jenkins, Kubernetes and my SVN repository for implementing CI/CD pipeline for deployment of my Spring Boot micro services. When I am exploring, I found that in Jenkins+Kubernetes deployment, the Docker image is pulling from image registries. And when I exploring sample implementation, I found that option for automated image building within Jenkins and options for defining the code repository like GitHub/SVN. </p>

<p>Regarding the Jenkins workflow, I had felt doubts and adding here,</p>

<p><strong>1.</strong> If the Docker image is pulling from some image registries for deployment using Jenkins and Kubernetes, then why we again defining the code repositories source link (GitHub/SVN) in Jenkins?</p>

<p><strong>Reason for doubt-</strong> I am thinking thinking that, Kubernetes and Jenkins are only depending image registry for deployment by image pulling. So I felt doubt that why we defining our GitHub repository link in Jenkins. This is only reason for this doubt. Please correct me if I am thinking in wrong direction.</p>

<p><strong>2.</strong> When I am exploring I found that automated Docker image building option within Jenkins using some scripts (I don't know properly exact working, I found in you tube video). So if we are pulling image from image registry, Then why we again using automated Docker image build within Jenkins? If this is a alternative option, what is the difference between image pulling and automated image building in Jenkins?  Is those all are according to our requirement? Or is there any other concept behind this?</p>

Mr.DevEng
<p>I am sorry, but I did not fully understand your question. I try to explain our CI/CD workflow. Maybe this helps.</p>

<ol>
<li>Developer commits code to GIT.</li>
<li>Jenkins automatically

<ul>
<li>checks out the repo</li>
<li>builds spring boot microservices (tests, code coverage, etc)</li>
<li>builds docker image</li>
<li>commit the docker images to a registry</li>
</ul></li>
</ol>

<p>With different switches/build parameters the developer can decide to build SNAPSHOT builds which are deployed only to a specific snapshot-registry for developers only, or to build real releases.</p>

<p>The developer can also decide to deploy the Docker image afterwards to the int or prod system. In this case Kubernetes pulls the image from the registry (which Jenkins previously deployed there).</p>
