I have a deployment.yaml containing deployment of 3 containers + LB service and the cloudbuild.yaml containing steps to build container images every time there's new commit to a certain branch on Bitbucket git repo.
All is working fine except the fact that my deplyment isn't updated whenever there's a new image version (I used :latest tag in deployment) and to change this I understood that my deployment images should use something unique, other than :latest, such as a git commit SHA.
Problem: I'm not sure how to perform image declaration update during GCB CI process to contain new commit SHA.
YAML's: https://paste.ee/p/CsETr
Found a solution by using image tag or URI variables in deployment fine and substituting them with sed during build-time.
deplyment.yaml
cloudbuild.yaml