Tag based build trigger doesn't work

Whenever I push a tag up nothing happens, if I push a new commit then it triggers the primary workflow.

My trigger map:

- tag: "*"
  workflow: deploy
- push_branch: "*"
  workflow: primary

The repository is on GitHub.

The first thing to check when you have build trigger issues is the webhook. E.g. GitLab has a separate “webhook event” for Tags which have to be enabled. The most up to date guides can be found in the README of the open source webhook server: https://github.com/bitrise-io/bitrise-webhooks

If the issue is not with the webhook setup, and you registered your app on bitrise.io a while ago, you should make sure that you have the new webhook URL registered, and not the old one. Initially we had a non open source bitrise.io/hooks endpoint for webhooks, but every new project registered should now get the new hooks.bitrise.io/ webhook URL automatically. If your webhook is still registered with a bitrise.io/hooks/ URL, just change it to the new hooks.bitrise.io/ URL. You can get this hooks.bitrise.io URL on the Code tab of your app on bitrise.io.

If you already have the hooks.bitrise.io/ webhook registered, then you should check the “Webhook history” of your service. hooks.bitrise.io/ returns a detailed error response in case it rejected the webhook, something like {"success_responses":[],"failed_responses":[{"status":"error","message":"trigger pattern did not match any defined mapping: Run triggered with params: push-branch: , pr-source-branch: prtest/t1, pr-target-branch: develop, but no matching workflow found","service":"bitrise","slug":"...","build_slug":"","build_number":0,"build_url":"","triggered_workflow":""}]}

For more information please see the http://devcenter.bitrise.io/webhooks/troubleshooting/ guide.

1 Like

I’m still having issue with this one.

The repo is on GitHub and the webhook server address is the last as mentioned.

From debugging the failure I got following message:

{"success_responses":[],"failed_responses":[{"status":"error","message":"trigger pattern did not match any defined mapping: no matching workflow found with trigger params: push-branch: , pr-source-branch: , pr-target-branch: , tag: v2.6.1","service":"bitrise","slug":"*****","build_slug":"","build_number":0,"build_url":"","triggered_workflow":""}]}

Running the Bitrise tool locally following command

$bitrise trigger-check --tag v2.6.1


$tag: v2.6.1 -> Released-to-App-Store

It seems the trigger map is correct but somehow something is missing. What else can I do to look more into this issue?

@iamfabiomilano can you please copy paste the trigger_map from your bitrise.yml (from bitrise.io), or copy paste the app’s bitrise.io URL (send it in email or through the onsite chat if you don’t want to share it here)

Sure thing!
I’ll post here to let the discussion more helpful for the community.

- tag: v*.*.*
  workflow: Released-to-App-Store
- push_branch: release/* # Any push to release branch git-folder
  workflow: Release
- push_branch: development # Any push to development
  workflow: Updated-Development-Branch
- push_branch: "*" # Any push to any git branch
  workflow: Pushed-to-remote
- pull_request_target_branch: "development" 
  workflow: Development-PR
- pull_request_target_branch: "*"
  workflow: PR

Seems good. Can you try to create a new Tag (and push it to github of course) and see if that works?

Follow up: after debugging the issue with Viktor we found out the trigger map for the project on bitrise.io was not set properly.

Thank you for the support.

1 Like

Any time @iamfabiomilano :wink:

For others, in short: they store the bitrise.yml in their repository and they updated the trigger_map there, but there was no pattern for tag on bitrise.io . Trigger map is always read from bitrise.io, not from the repository, as the repository is only accessible once the build is started and one of the main use case of the trigger map is to ignore things / to not to start a build at all for certain patterns / events.