dockertriggersspinnakeramazon-ecr

Spinnaker build does not trigger on a re-push of an existing tag (like latest)


The Spinnaker document says that a push to the Docker Registry will trigger Spinnaker Build.

We have configured the Automated Triggers to Docker Registry (AWS ECR)

However, the tag we are using is :latest

In the document it says Leave the Tag field blank. This will trigger on all new tags, but will not trigger on a re-push of an existing tag (like latest)

I want to know what is the reason for not redeploying a re-push or push of same tag?


Solution

  • The reason behind why re-push of an existing image tag does not work with Automated Triggers to Docker Registry is deployment reproducibility.

    As a maintainer of Spinnaker repository mentions in their comment on issue: Spinnaker not triggering pipeline when new image is released to Docker registry:

    This is the intended behavior for the docker registry triggers, since deploying from the same tag is not reproduceable. See more here. https://github.com/spinnaker/spinnaker/issues/2037#issuecomment-392570341

    Taking a look at the problem from a DevOps perspective. Spinnaker - and DevOps in general - prefers what is called "immutable infrastructure". Ref: search for "immutable" on Spinnaker homepage. Immutable infrastructure does not yet have a definition on Wikipedia that I could find. In place of a Wikipedia definition, below is some reference material on immutable infrastructure, found on Google:

    For the scope of this question focusing only on the deployment reproducibility aspect of immutable infrastructure should be enough. A mutable image, or a mutable tag (latest is a mutable tag) makes deployment reproducibility challenging. (Just run docker run golang:latest go version now, and a few weeks later to see what I mean.) So a mutable tag conflicts with making deployments reproducible, thus infrastructure immutability, and DevOps in general.