Each pull request would cause two CI runs

Cheng Zhao's Avatar

Cheng Zhao

09 Aug, 2014 01:29 AM

See https://ci.appveyor.com/project/zcbenz/atom-shell/history, in it each commit in pull request would emit two CI runs, one seems to be caused by GitHub generated merge commit.

  1. Support Staff 1 Posted by Feodor Fitsner on 09 Aug, 2014 01:40 AM

    Feodor Fitsner's Avatar

    Right, it builds the original "source" branch and then merged commit - there are two separate webhook events. Would you expect to build only merged one?

  2. 2 Posted by Cheng Zhao on 09 Aug, 2014 02:22 AM

    Cheng Zhao's Avatar

    I only expect the one that affects the CI state of GitHub's pull request (I'm not sure which one), the other one's result can only be seen on AppVeyor's page, which I think most GitHub users would not care. Building twice for one push also delays other pushes in queue greatly.

    Travis CI seems to only build for the pull request's branch.

  3. Support Staff 3 Posted by Feodor Fitsner on 09 Aug, 2014 02:39 AM

    Feodor Fitsner's Avatar

    OK, that makes sense. I will give it a thought how to fix that.

  4. 4 Posted by its.the.doc on 19 May, 2015 02:06 AM

    its.the.doc's Avatar

    This is a must for me. I built my whole model around forking. I need to be able to only build the result of the pull requests merging into the repo or I can't use this tool. Any updates on this?

  5. Support Staff 5 Posted by Feodor Fitsner on 19 May, 2015 02:14 AM

    Feodor Fitsner's Avatar

    If you don't need building "base" repo on each pull request update (i.e. building virtual merge) then just disable "pull_request" event for AppVeyor webhook on GitHub.

  6. 6 Posted by its.the.doc on 19 May, 2015 02:16 AM

    its.the.doc's Avatar

    oh ok, fair enough. So then it'll just build the commit that results from the PR?

  7. 7 Posted by its.the.doc on 19 May, 2015 02:17 AM

    its.the.doc's Avatar

    Wait now, I actually have pull request unchecked.

  8. 8 Posted by its.the.doc on 19 May, 2015 02:18 AM

    its.the.doc's Avatar

    Can you just tell me specifically what I need?

    Every time I accept a pull request, it builds twice.

    I also have various other things checked related to deployment and I'm not sure how many of those things are even necessary.

  9. Support Staff 9 Posted by Feodor Fitsner on 19 May, 2015 02:21 AM

    Feodor Fitsner's Avatar

    What do you have in Recent deliveries when you do the merge.

    - Feodor

  10. 10 Posted by its.the.doc on 19 May, 2015 02:26 AM

    its.the.doc's Avatar

    I have a release, various status's, and two pushes...one is the original commit, and one is a merge commit created from merging the fork in.

  11. Support Staff 11 Posted by Feodor Fitsner on 19 May, 2015 02:27 AM

    Feodor Fitsner's Avatar

    So, it does look correct from there?

  12. 12 Posted by its.the.doc on 19 May, 2015 02:29 AM

    its.the.doc's Avatar

    Well I'm not sure what you mean by correct exactly. I mean, if that's the intended behavior then yeah, everything looks good. No bad webhook calls or pull request calls.

    I'd like to only build the result of the repository after the pull request is finished, not every commit involved.

  13. Support Staff 13 Posted by Feodor Fitsner on 19 May, 2015 02:36 AM

    Feodor Fitsner's Avatar

    If you have "pull request" event disabled on the webhook then there are at least two ways to prevent building unnecessary commits: a) setup branch filter, i.e. build master only or b) add [skip ci] into commit message.

  14. 14 Posted by its.the.doc on 19 May, 2015 02:40 AM

    its.the.doc's Avatar

    Alright, so the model I have, forks get merged into master, tagged, and build.

    Then at a later stage I can choose if and where to deploy each version(outside of the build system).

    So I don't have another branch to use. Branching happens pre pull request.

    The second request, I'm not sure what you mean by that. I use that already, but are you saying I should ask each person who gives me a pull request to type in `[skip ci]` into their commit messages?

    I'm not sure I follow your suggestions maybe.

  15. Support Staff 15 Posted by Feodor Fitsner on 19 May, 2015 02:48 AM

    Feodor Fitsner's Avatar

    Sorry, if I confused you. I just don't understand when/where do you get two builds? If you have a fork and "pull request" is disabled on its base repo how doing something in that fork could affect base repo?

    Can you drop me a link to project build history please?

  16. 16 Posted by its.the.doc on 19 May, 2015 03:00 AM

    its.the.doc's Avatar
  17. Support Staff 17 Posted by Feodor Fitsner on 19 May, 2015 03:32 AM

    Feodor Fitsner's Avatar

    OK, one is a tag, but it's strange it wasn't recognized as a tag by AppVeyor. Do you have "Skip tags" set on General tab of project settings?

  18. 18 Posted by its.the.doc on 19 May, 2015 03:45 AM

    its.the.doc's Avatar

    Yeah I do "Do not build tags" is checked.

    If it helps, the tag is generated by github when it creates a release.

  19. Support Staff 19 Posted by Feodor Fitsner on 19 May, 2015 03:53 AM

    Feodor Fitsner's Avatar

    I see regular commit produces two builds as well? https://ci.appveyor.com/project/KellyElton/octgn/history

    That's really weird if so. Crazy idea - is there any chance you have two webhooks on that repo using the same webhook URL? :)

  20. 20 Posted by its.the.doc on 19 May, 2015 03:57 AM

    its.the.doc's Avatar

    Yeah, you know what, good call. I do lol

  21. Support Staff 21 Posted by Feodor Fitsner on 19 May, 2015 03:59 AM

    Feodor Fitsner's Avatar

    :) I'd believe in a miracle otherwise

  22. 22 Posted by its.the.doc on 19 May, 2015 04:01 AM

    its.the.doc's Avatar

    Haha. Sorry you spent time on that. I've been multitasking creating a new release system and pushing these builds out. Working on like 3 different code bases, my brains a little frazzled.

    Thanks again for that.

  23. Support Staff 23 Posted by Feodor Fitsner on 19 May, 2015 04:06 AM

    Feodor Fitsner's Avatar

    Sure, no problem!

  24. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:56 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