We are currently using Container Builder (rebranded recently as Cloud Build) to build and upload our docker images to GCR. Generally, we tag our docker images with a commit-sha and
latest. This causes our GCR PubSub to emit two messages one for the image with each tag name. In order to prevent double builds in Spinnaker I had setup a Payload Constraint where the
key: tag and
value: latest. This seemed to work well enough for a while. Recently we added a pipeline that would deploy an image based on if it was tagged as
dev when it was uploaded to GCR. Following the same logic as above, I updated the Payload Constraints to be
key: tag and
value: dev for this new pipeline.
I am noticing though that builds are getting kicked off for this new pipeline when our normal build process happens (the one resulting in a tag of
latest) and I can’t figure out why. I read in the help bubble next to Payload constraints that the values can be provided as regex so I tried to be more explicit with
value: ^dev$ but this caused the pipeline to not be triggered at all.
One thing to note, the pipeline DOES kick off when the
dev tagged image is uploaded (while the pipeline that checks
latest DOES NOT) it just also kicks off with the
latest tag too.
It’s very possible I’m not understanding how this is supposed to work correctly but any help would be much appreciated!