Project mixes builds from all branches

vanbastian01's Avatar

vanbastian01

17 Jul, 2014 03:54 PM

hi,
I have two projects with different branches.
I tried to list the whitelist and blacklist branches in my appveyor.yml file.
but still, it always build from any last branches commit.
Please check attachment

  1. Support Staff 1 Posted by Feodor Fitsner on 17 Jul, 2014 04:03 PM

    Feodor Fitsner's Avatar

    Make sure every branch contains appveyor.yml with blacklist/whitelist. When AppVeyor build specific branch it's trying to download appveyor.yml from that branch.

  2. 2 Posted by vanbastian01 on 17 Jul, 2014 05:22 PM

    vanbastian01's Avatar

    hmm..it's not working. both projects still build mixes branches.
    here's my appveyor.yml for both projects.
    also, I attched my configuration settings if it's related.

    branches:
      # whitelist
      only:
        - master
        - staging
    
      # blacklist
      except:
        - versioning
    
  3. Support Staff 3 Posted by Feodor Fitsner on 17 Jul, 2014 05:31 PM

    Feodor Fitsner's Avatar

    Does "staging" branch contain the same appveyor.yml shown above?

  4. 4 Posted by vanbastian01 on 17 Jul, 2014 05:36 PM

    vanbastian01's Avatar

    yes it does

  5. Support Staff 5 Posted by Feodor Fitsner on 17 Jul, 2014 05:58 PM

    Feodor Fitsner's Avatar

    OK, looking at all data... you white-listed "master" and "staging" branches. The same appveyor.yml exists in both branches. Projects page shows builds for commits from "master" and "staging" which is according to configuration. So, what do you mean by "mixes branches", what's the expected behavior?

  6. Support Staff 6 Posted by Feodor Fitsner on 17 Jul, 2014 06:00 PM

    Feodor Fitsner's Avatar

    ...and on a side note - UI settings are ignored (except environment variables) when there is appveyor.yml found.

  7. 7 Posted by vanbastian01 on 17 Jul, 2014 09:12 PM

    vanbastian01's Avatar

    So I have two projects appveyor.
    one is for master branch and the other for staging.
    my expectations is any commits coming will goes to correct project.
    right now, each project get any commits from any branches

  8. Support Staff 8 Posted by Feodor Fitsner on 17 Jul, 2014 09:20 PM

    Feodor Fitsner's Avatar

    OK, I see. And both projects are based on the same repository, right?

  9. 9 Posted by vanbastian01 on 17 Jul, 2014 09:33 PM

    vanbastian01's Avatar

    Correct

  10. Support Staff 10 Posted by Feodor Fitsner on 18 Jul, 2014 08:52 AM

    Feodor Fitsner's Avatar

    Ah, I see now. As they both are based on the same repository they have the same configuration and behaves exactly the same when triggered by GitHub webhooks.

    I think currently the only way to do such "routing" is to configure one project through appveyor.yml and the second one through UI.

  11. 11 Posted by Robin on 06 Nov, 2015 09:56 AM

    Robin's Avatar

    Hello,

    we have the same issue, one Github repository and two AppVeyor projects.
    A commit in one branch triggers the build of both projects even though in the project exclude "each other".

    The behavior here is not clear for this usecase: http://www.appveyor.com/docs/branches

    Just to make things clear, I have a greenshot repository with github with two branches (1.2 and 1.3). I have 2 AppVeyor projects, one should build 1.2 and one should build 1.3

    In the branch 1.2 there is an appveyor.yml which says:
    branches:
      only:
      - 1.2

    In the branch 1.3 there is an appveyor.yml which says:
    branches:
      only:
      - 1.3

    A commit to either 1.2 or 1.3 triggers a build on both projects.

    There are 2 webhooks at github, one for the 1.2 AppVeyor project and one for the 1.3 AppVeyor project. Unfortunately I can't filter the hook in Github or AppVeyor.. :(

    I also tried setting the "branch only" in the UI, without losing the appveyor.yml as I need this, but this doesn't work..

    Did anything chance since your last reply and I did something wrong?
    Or is the behaviour unchanged and this is not possible? (if so, a remark in the documentation would be nice!!)

    Best wishes,
    Robin

  12. 12 Posted by Robin Krom on 06 Nov, 2015 10:04 AM

    Robin Krom's Avatar

    Sorry, I forgot to register, previous comment is from "me".

    Best wishes,
    Robin

  13. Support Staff 13 Posted by Feodor Fitsner on 06 Nov, 2015 06:41 PM

    Feodor Fitsner's Avatar

    Per my last reply - from configuration standpoint both projects are absolutely identical as they use the same appveyor.yml.

    However, since my last reply we added an ability to set custom name for yml configuration - there is Custom configuration .yml file name option on General tab of project settings. With the help of this feature you can have two yml files in your repo, say project-a.yml and project-b.yml. There you define branche restrictions and etc. Should do the trick.

  14. 14 Posted by Robin Krom on 06 Nov, 2015 09:55 PM

    Robin Krom's Avatar

    Thanks Feodor, that really helped! Works perfectly!

    It's not very intuitive though, maybe I am just only seeing my problem but I feel like this use-case is not very uncommon and maybe you can add this as an example?

    Our build is working smooth again!

    Best wishes,
    Robin

  15. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:01 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac