<p>I have started to learn GitOps ArgoCD. I have one basic doubt. I am unable to test ArgoCD because I do not have any Cluster. It will be so kind of you if you can clear my doubts.</p>
<ol>
<li>As an example currently I am running my deployment using <code>test:1</code> docker image. Then using Jenkins I upload <code>test:2</code> and then put <code>test:2</code> in place of <code>test:1</code> then ArgoCD detects the change and applies the new image in a cluster.
But if before I used <code>test:latest</code> then using Jenkins I uploads a new image with same name <code>test:latest</code>. What will happen now? Will ArgoCD deploy the image ( name and tag of the new and previous image are the same )</li>
</ol>

<p>If you need automation, you can consider <a href="https://argocd-image-updater.readthedocs.io/en/latest/" rel="nofollow noreferrer"><strong>Argo CD Image Updater</strong></a>, which does include in its <a href="https://argocd-image-updater.readthedocs.io/en/latest/basics/update-strategies/" rel="nofollow noreferrer">update strategies</a>:</p>
<p><code>latest/newest-build</code> - Update to the most recently built image found in a registry</p>
<blockquote>
<p>It is important to understand, that this strategy will consider the build date of the image, and not the date of when the image was tagged or pushed to the registry.</p>
<p>If you are tagging the same image with multiple tags, these tags will have the same build date.<br />
In this case, Argo CD Image Updater will sort the tag names lexically descending and pick the last tag name of that list.</p>
<p>For example, consider an image that was tagged with the <code>f33bacd</code>, <code>dev</code> and <code>latest</code> tags.<br />
You might want to have the <code>f33bacd</code> tag set for your application, but Image Updater will pick the <code>latest</code> tag name.</p>
</blockquote>
<pre class="lang-yaml prettyprint-override"><code>argocd-image-updater.argoproj.io/image-list: myimage=some/image
argocd-image-updater.argoproj.io/myimage.update-strategy: latest
</code></pre>
