Best practice to ensure consistent deploys

A n00b question. We are the in the process of setting up Spinnaker with the intent of doing continuous deployment for a new project. The set-up would be as follows:

  • Trigger would be an upload of a new docker image in our
  • Deployment is based on K8S manifest (e.g. k8s-manifest.yaml), the manifest itself would be uploaded to an S3 bucket as a part of the build and the manifest is set-up as an Expected artifact in the build pipeline.
    The manifest itself would contain the actual docker image tag. We are using S3 versioning to version the manifests (so the manifest filename would be the same but the tags would be different with each build).
  • As a part of the pipeline we have multiple stages – do migrations, deploy to stating, do integration tests and then promote to production

Since we are following the CD process, there can be multiple versions of the docker image created by the build process while the pipeline is processing. I have a couple of questions around the behavior of the artifacts in pipeline:

  • Once a Spinnaker pipeline starts with a manifest file from S3 which has the Docker image version V1, is this manifest ‘cached’ locally and carried through the full lifetime of the pipeline or does every stage of the pipeline fetch the artifact separately?
  • Are there any best practices around how the Manifest file can be versioned in a way that this can be carried though the full pipeline execution?