Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

wrong Cloud Build trigger is activated from GitLab merge web hook

Hi ALL,

Working on usage of GitLab web hooks for activating Cloud Build triggers. Problem that I'm facing is that my web hook to push trigger is working fine,  but merge trigger is never started, instead push trigger is activated. On GitLab side web hook URLs are different and pointing to right trigger URLs.

While trying to troubleshoot has following: when using dummy build trigger that has inline default step ( ubuntu image to run echo hello world) it works fine, when I'm adding Substitution vars getting an error:

Your build failed to run: generic::invalid_argument: generic::invalid_argument: invalid value for 'build.substitutions': key in the template "URL" is not a valid built-in substitution
 
_URL is using $(body.project.git_ssh_url), which in accordance to doc should be fine for Merge request event , so it could mean that there is a difference on event type. 
 
Please advise or suggest direction for debugging.
 
Best,
Alex

 

0 5 1,022
5 REPLIES 5