# Trigger build doesn't work

**URL:** <https://travis-ci.community/t/trigger-build-doesnt-work/1464>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [December 15, 2018, 9:01pm UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464 "2018-12-15T21:01:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bynull](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bynull](https://travis-ci.community/u/bynull)\
**Post date:** [December 15, 2018, 9:01pm UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/1 "2018-12-15T21:01:43Z")

</div>

Hi,  
I can’t execute `trigger build` for the new branches in my project.  
Travis shows me only old branches [https://travis-ci.org/CorfuDB/CorfuDB](https://travis-ci.org/CorfuDB/CorfuDB)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/travis_ci/original/1X/414848a7605f29005a005dce73f00f3fc5233434.jpeg)

travis.yml looks ok [https://github.com/CorfuDB/CorfuDB/blob/master/.travis.yml](https://github.com/CorfuDB/CorfuDB/blob/master/.travis.yml)

To check that the problem on travis-ci side I have cloned corfuDb, created a branch (patch1), and tried to execute `trigger build`, it showed me my new branch. So, travis.yml can’t affect travis.  
[https://goo.gl/ymjXKJ](https://goo.gl/ymjXKJ)

Can you please help me solve the issue?

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [December 16, 2018, 2:26am UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/2 "2018-12-16T02:26:03Z")

</div>

What new branch is missing from the drop down list?

---

<div class="post-metadata">

**Author:** ![bynull](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bynull](https://travis-ci.community/u/bynull)\
**Post date:** [December 16, 2018, 2:40am UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/3 "2018-12-16T02:40:47Z")

</div>

`stream-log-metrics-enhancement` for instance

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [December 17, 2018, 1:50pm UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/4 "2018-12-17T13:50:53Z")

</div>

The drop down list includes only the branches that have any build. `stream-log-metrics-enhancement` is currently excluded and has no builds, so it does not show up.

Also reported as [Branches don't show up in the API Build Web UI unless a build has already been triggered on that branch](https://travis-ci.community/t/branches-dont-show-up-in-the-api-build-web-ui-unless-a-build-has-already-been-triggered-on-that-branch/1129).

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [December 17, 2018, 1:51pm UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/5 "2018-12-17T13:51:25Z")

</div>

I’m marking this as “solved” in favor of the other topic.

---

<div class="post-metadata">

**Author:** ![bynull](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bynull](https://travis-ci.community/u/bynull)\
**Post date:** [December 17, 2018, 11:48pm UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/6 "2018-12-17T23:48:37Z")

</div>

@BanzaiMan could you clarify your answer a little bit? A have 2 questions:

1. Why the branch is excluded (has no builds), how you figure out that? Even if I create a new branch it will not appear in the dropdown list.
2. Why if I fork the repo and create a new branch it will show up?

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [December 18, 2018, 12:45am UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/7 "2018-12-18T00:45:05Z")

</div>

1. [https://github.com/CorfuDB/CorfuDB/blob/0f0cd11a42ce6c0713aae6270a7963e2139885ec/.travis.yml#L11](https://github.com/CorfuDB/CorfuDB/blob/0f0cd11a42ce6c0713aae6270a7963e2139885ec/.travis.yml#L11)
2. What fork are you talking about?

---

<div class="post-metadata">

**Author:** ![bynull](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bynull](https://travis-ci.community/u/bynull)\
**Post date:** [December 18, 2018, 3:15am UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/8 "2018-12-18T03:15:45Z")

</div>

1. We run build if a branch is not a master branch, should work, right?

2. Sorry for confusion [https://travis-ci.org/xnull/CorfuDB](https://travis-ci.org/xnull/CorfuDB) you can see that branch `patch1` showed up

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [December 18, 2018, 6:39pm UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/9 "2018-12-18T18:39:45Z")

</div>

1. Oops. Sorry. You’re right; that condition does not exclude the `stream-log-metrics-enhancement` branch. But that branch no longer exists. [https://github.com/CorfuDB/CorfuDB/tree/stream-log-metrics-enhancement](https://github.com/CorfuDB/CorfuDB/tree/stream-log-metrics-enhancement)
2. [https://travis-ci.org/xnull/CorfuDB/branches](https://travis-ci.org/xnull/CorfuDB/branches) shows that the `patch1` branch has builds, so I expect that to show up in the drop down list.

---

<div class="post-metadata">

**Author:** ![bynull](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bynull](https://travis-ci.community/u/bynull)\
**Post date:** [December 18, 2018, 7:04pm UTC](https://travis-ci.community/t/trigger-build-doesnt-work/1464/10 "2018-12-18T19:04:49Z")

</div>

Oh, looks like `trigger build` depends on setting `build pushed branches` which is strange)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/travis_ci/original/1X/998fca82d418b28206f2d049c97f001581c102d4.png)

When I activated it, my branch test\_test (I just created it for testing) was triggered and showed up in dropdown list.

So, for some reason a build must be triggered and after that it will be added to the dropdown list, but this doesn’t work if we enable builds only for pull requests and maybe my settings affected this logic somehow, and combination of conditions in .travis.yml and disabled setting `build pushed branches` causes this problem
