I’ve setup a build trigger on a tag starting with v*, when I create the tag on github and link it to a specific branch the trigger starts correctly, however the main branch is pulled, and not that related to the tag.
The git clone step version I’m using is the 6.2.1, the variable (unmodifiable) of the git branch to clone is $BITRISE_GIT_BRANCH which should be set by default, as for the other triggers, with the branch related to the trigger.
Which build Step causes the issue and which version of the step?
E.g.: Git Clone v6.2.1
Setup a trigger on git tag using v* as a regexp
Create a tag on github by adding a release, link the tag to whichever branch (in my case, to the branch “release-v36”
The trigger starts cloning branch “main” and not branch “release-36”
Hey! release-v36 does not seem to match the v* pattern. Considering it’s cloning main, I’d guess a different trigger is executed. Can you check what other triggers you have? Have you tried setting the regular expression to *v*?
Hi! Thanks for your answer, I wouldn’t know how could a *v*help me though.
Just to be clear on our trigger setup:
bugfix-* | hotfix-* | feat-* regexps filter branch name on push and trigger a dev build, works just fine.
main branch pushes trigger an internal build, works fine as well
release-* regex filters branch name on pushes and triggers a staging build (our open beta), works fine
Now, we added a trigger on tags (so not on pushes), with regex v*that should trigger a production build (the actual build we send to the stores). The trigger reacts correctly to the tag, when I go on github and create a release by tagging a specific branch and using, for instancem, v36 as the tag name, bitrise reacts to the tag and starts correctly the production build, however, the branch it cones is not the branch I associated to the tag, but the master/main branch of our repo. I’m afraid that, if we tag to some commit before the current last commit of main/master, bitrise will pull the latest version of main and eventually unwanted new commits.
Having almost exact same issue. We want to push tags from release/ branch but the build is taking master as the branch.
Not sure also why the manual trigger modal in the web ui in the advance tab have the option to define the branch and the tag if bitrise only take master as the branch when using a tag in the trigger map. I really hope this can be changed as is AFIAK normal gitflow.
I think the issue that dev_much is describing (same as my case) is that the tag is correct but is not working from any branch but main/master.
For example if the tag is pushed from release-2 branch, the build will be triggered but using main branch not release-2 branch.
Is there a way to make this happen or is currently a limitation on bitrise?
What you are describing looks like a bug. However, we are not yet able to reproduce this. Can you tell me based on what information you know that the build triggered is using the main branch instead of checking out the tag? Can you paste a snippet of your logs where the cloning happens?
Also tried adding - push_branch: release/*after the tag filter in the trigger map but no luck either.
Also, tried to use the web gui to trigger a manual build (without the push_branch: release/* on trigger_map) and the funny thing is it works:
@speedlight I tried reproducing this with both Github and Bitbucket to see if there’s a difference or an issue with triggers or webhooks but I could not find any issue with any of them. It also looks like there may be a few issues causing this. Would you mind opening a support ticket? Please reference this thread as it may help getting to the resolution faster.