Build on pull request from fork repo on Bitbucket

milo's Avatar

milo

12 Oct, 2018 12:57 PM

Our team use one main repo (it has only master, develop and release branches)for project on Github. Each developer has to fork the main repo and create a pull request from his fork repo to merge feature into develop branch in main repo. Every pull request from fork repo would trigger a CI build on appveyor, which works very well.

Now we move our project to bitbucket and want to keep the same workflow.
But it seems that appveyor doesn't respect the appveyor.yml file in our repo at all, when a build is triggered by pull request from fork repo on Bitbucket.

we have done some tests and found the following cases:

1 no fork workflow: only one repo named project_1, developer creates a new feature branch named feature/1 directly in this repo and a pull request from feature/1 to develop. A CI build on appveyor is triggered, the build uses the appveyor.yml file in the repo and works well.

2 fork workflow: one main repo named project_1, developer has his own fork repo named developer_1/project_1. he creates a new feature branch named feature/1 in his fork repo and from there a pull request to develop branch in main repo. A CI build on appveyor is tiggered, but this build only clones the repo and then return directly Build success without using the appveyor.yml file in the repo.

my question is, does appveyor support the build on pull request from fork repo on Bitbucket? if yes, which settings have I missed?

  1. Support Staff 1 Posted by Owen McDonnell on 12 Oct, 2018 03:56 PM

    Owen McDonnell's Avatar

    When you created your AppVeyor project it would have been created as a GitHub project which means that the appveyor.yml config file is fetched before the build in a way that is allowed by the GitHub api.

    Now that you've changed the type of repository (presumable without adding a new project) AppVeyor doesn't know the 'proper' way to fetch your single config file.

    If you want to change the version control service used, you should add the repo as a new project in AppVeyor. Once you do that, then yes, AppVeyor does support building on pull request from fork repo on Bitbucket.

  2. 2 Posted by milo on 12 Oct, 2018 07:15 PM

    milo's Avatar

    thanks for your reply! It's glad to know that AppVeyor does support building on pull request from fork repo on Bitbucket.

    we did add the repo as new project on appveyor. Now there are two 'project_1' projects on appveyor. One for github the other for bitbucket.

    On Bitbucket when we create a pull request from the upstream repo, AppVeyor does trigger a Build and the appveyor.yml is used.
    But when we create a pull request from a fork repo, AppVeyor triggers a Build too but the appveyor.yml is not recognize/used, therefor the test script is skipped entirely.

    can you please give me some tips, how could be the reason for it? Thanks again

  3. Support Staff 3 Posted by Owen McDonnell on 12 Oct, 2018 10:40 PM

    Owen McDonnell's Avatar

    Can you give me a link to the build. I can't find any account associated with your email address.

  4. Support Staff 4 Posted by Owen McDonnell on 16 Oct, 2018 02:24 PM

    Owen McDonnell's Avatar

    Closing in favor of this.

  5. Owen McDonnell closed this discussion on 16 Oct, 2018 03:48 PM.

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