Search code examples
regexgoogle-cloud-platformgoogle-cloud-build

Cloudbuild trigger that builds when tag is pushed is not invoked automatically


I've created a cloudbuild trigger that should fire a when a tag matching the regex is pushed to the repository.

The regex is ^production/widget_(.+)$ and the UI is showing that multiple tags are matched. When pushing a new tag that matches the regex, I would expect it the cloudbuild trigger to start a new build.

The tags are formatted like this for instance: production/widget_1.0_1745

enter image description here


Solution

  • Still not sure what exactly the problem was but after I changed the path structure to production/widget/1.0.1 and adjusted the regex accordingly, cloudbuild is picking up newly pushed tags

    Update

    After some time I figured out that the push tag invocation can get prevented by file filters if these don't allow a build to trigger.