tag:help.appveyor.com,2012-11-13:/discussions/questions/1700-pushing-a-feature-branch-schedules-two-buildsAppVeyor: Discussion 2018-09-18T04:58:29Ztag:help.appveyor.com,2012-11-13:Comment/380145292015-09-24T12:39:30Z2015-09-24T12:39:37ZPushing a feature branch schedules two builds<div><p>When I push a feature branch, AppVeyor schedules two build, one
for the feature branch, and one for master. Why is that, and how
can I turn it off?</p></div>robert.jeppesentag:help.appveyor.com,2012-11-13:Comment/380145292015-09-24T18:34:23Z2015-09-24T18:34:23ZPushing a feature branch schedules two builds<div><p>Is it because of pull requests?</p>
<p>Check what's being sent to AppVeyor on GitHub webhook settings
in "Recent deliveries".</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292015-09-24T19:09:13Z2015-09-24T19:09:13ZPushing a feature branch schedules two builds<div><p>Thanks for your attention!</p>
<p>Yes, it is because of a pull request. I see two deliveries with
a few seconds between each. Two boxes are checked for events: 'Pull
request' and 'Push'. Is my intuition correct that I should disable
Pull request (because AppVeyor will be notified of the push anyway?
And in that case, why didn't AppVeyor set it correctly when it
created the webhook?</p>
<p>I'm not sure what to look for in 'recent deliveries'.</p></div>robert.jeppesentag:help.appveyor.com,2012-11-13:Comment/380145292015-09-24T19:12:25Z2015-09-24T19:12:25ZPushing a feature branch schedules two builds<div><p>For new webhooks AppVeyor sets both "push' and "pull request"
events. Disable "pull request" if you wan't to build it only when
it's merged into master.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292015-09-24T19:15:35Z2015-09-24T19:15:35ZPushing a feature branch schedules two builds<div><p>No, I want PR builds, for sure. I just don't want master to
build every time a PR is updated. AppVeyor should be able to
distinguish between these things?</p></div>robert.jeppesentag:help.appveyor.com,2012-11-13:Comment/380145292015-09-24T19:19:26Z2015-09-24T19:19:26ZPushing a feature branch schedules two builds<div><p>Maybe the confusion is this: I'm doing PR from the same repo,
not a fork. I still think AppVeyor should be able to handle
this.</p></div>robert.jeppesentag:help.appveyor.com,2012-11-13:Comment/380145292015-09-24T19:45:32Z2015-09-24T19:45:32ZPushing a feature branch schedules two builds<div><p>Yeah, this might be a problem.</p>
<p>Builds are triggered on:</p>
<ul>
<li>push to branch</li>
<li>merge PR to branch</li>
<li>open PR</li>
<li>sync PR (when you do push to branch with open PR)</li>
</ul></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292015-09-24T21:53:25Z2015-09-24T21:53:25ZPushing a feature branch schedules two builds<div><p>Yes, the triggers you set are probably fine,<br>
but you need to inspect the incoming web hooks to see<br>
where a master build is not necessary. An optimization opportunity!
:)</p></div>robert.jeppesentag:help.appveyor.com,2012-11-13:Comment/380145292015-10-05T11:10:02Z2015-10-05T11:10:02ZPushing a feature branch schedules two builds<div><p>The following should work better?<br>
When commit is within repo, build using 'Push to branch', ignore
other triggers.<br>
When commit is in a different repo (PR from fork) build on
Open/Sync PR only.</p>
<p>Merge PR to branch is covered by the first rule.</p></div>robert.jeppesentag:help.appveyor.com,2012-11-13:Comment/380145292015-10-05T16:45:48Z2015-10-05T16:45:48ZPushing a feature branch schedules two builds<div><p>Basically, this is how it currently works, but you also suggest
to do not build PR if it's originating from the same repo?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292015-10-06T06:40:08Z2015-10-06T06:40:08ZPushing a feature branch schedules two builds<div><p>Yes. The 'Push to branch' trigger will take care of that when
it's in the same repo.</p>
<p>Also, 'Merge PR to branch' should never be needed, as 'Push to
branch' will always take care of that, whether the PR originates
from the same repo or not.</p></div>robert.jeppesentag:help.appveyor.com,2012-11-13:Comment/380145292016-05-11T12:20:36Z2017-02-13T08:54:47ZPushing a feature branch schedules two builds<div><p>Hi,</p>
<p>we have exactly this problem.<br>
Is there a workaround or plans to change something?</p>
<p>kind regards,<br>
James Swift</p></div>jamestag:help.appveyor.com,2012-11-13:Comment/380145292016-05-11T16:54:04Z2016-05-11T16:54:04ZPushing a feature branch schedules two builds<div><p>This is how GitHub works. When you have a branch and PR for that
branch in the same repo GitHub calls webhook 2 times: 1st call when
you push to branch and 2nd call when PR for that branch is
synchronized.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292016-06-22T03:50:05Z2016-06-22T03:50:06ZPushing a feature branch schedules two builds<div><p>Aren't both for the same Commit ID? Can you dedup the webhook
call on that?</p></div>Jay Bazuzitag:help.appveyor.com,2012-11-13:Comment/380145292016-06-22T20:13:31Z2016-06-22T20:13:31ZPushing a feature branch schedules two builds<div><p>Those are different commits. One is latest branch commit and
another one master branch merged with branch.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292016-06-22T20:15:41Z2016-06-22T20:15:41ZPushing a feature branch schedules two builds<div><p>I'm just thinking...what if we have an option saying "Do not
build PRs from the same repository" - would that solve this issue?
This case only branch builds would be started.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292016-06-23T20:55:25Z2016-06-23T20:55:25ZPushing a feature branch schedules two builds<div><p>IMHO, only the PR builds matter. People use branches on the main
repo as collaboration points. We need CI for each push to a PR, but
we don't really care about the branch itself.</p></div>Michael Sarahantag:help.appveyor.com,2012-11-13:Comment/380145292016-06-25T17:38:21Z2016-06-25T17:38:21ZPushing a feature branch schedules two builds<div><p>Well, the implementation of such scenario could be tricky from
performance perspective. Basically, on each push to a branch we
should check if repository contains any open PRs with the
branch.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292016-06-28T05:14:09Z2016-06-28T05:14:09ZPushing a feature branch schedules two builds<div><p>OK, seems I've finally realized how to solve this issue (at
least for GitHub which has extensive API)!</p>
<p>There is an API for querying repository pull requests and
filtering them by head branch: <a href="https://developer.github.com/v3/pulls/#list-pull-requests">https://developer.github.com/v3/pulls/#list-pull-requests</a></p>
<p>We can have another option on General tab of project settings,
kind of <code>Do not build feature branch if open PR exists</code>
(feel free to suggest a better, more clear name) which when enabled
check if there are any opened PRs for push branch and if there any
PRs build won't be started assuming there will be another build for
PR(s).</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292016-06-28T05:16:22Z2016-06-28T05:16:22ZPushing a feature branch schedules two builds<div><p>An issue: <a href="https://github.com/appveyor/ci/issues/882">https://github.com/appveyor/ci/issues/882</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380145292018-07-21T12:48:32Z2018-07-21T12:48:35ZPushing a feature branch schedules two builds<div><p>When I committed features branch it is build failed its appear my appveyor.</p>
<p>Please help me if any setting for Features branch failed not appear in my Appveyor .</p></div>Chetan Kosrabetag:help.appveyor.com,2012-11-13:Comment/380145292018-07-21T14:09:57Z2018-07-21T14:09:57ZPushing a feature branch schedules two builds<div><p>Chetan Kosrabe: not sure we understand the problem. Do you need feature branches for not being built, you you want them for not setting build status on GitHub or other source control service? Or maybe something else... Please elaborate.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/380145292018-07-24T14:21:40Z2018-07-24T14:21:40ZPushing a feature branch schedules two builds<div><p>Dear Ilya Finkelshteyn,</p>
<p>Features branch committed on GitHub its build started CI its showing in CI.<br>
I want to don't show in CI features branch.</p>
<p>[image: image.png] Currently Features branch committed showing my CI appveyor account I want<br>
to show only develop & master committed.</p>
<p>Thanks & Regards<br>
Chetan Kosrabe<br>
System Administrator</p></div>Chetan Kosrabetag:help.appveyor.com,2012-11-13:Comment/380145292018-07-24T14:25:57Z2018-07-24T14:25:57ZPushing a feature branch schedules two builds<div><p>Read <a href="https://www.appveyor.com/docs/branches/#white--and-blacklisting">this part</a> of documentation.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/380145292018-08-01T20:27:51Z2018-08-01T20:27:52ZPushing a feature branch schedules two builds<div><p>Hi sir,<br>
In Appveyor.yml file below server setting CI deployment success</p>
<p>deploy:</p>
<ul>
<li>
<p>provider: WebDeploy</p>
<p>server: https://domainname:8172/msdeploy.axd?site=domainname</p>
<p>website: domainname</p>
</li>
</ul>
<p>But I can't deployment below server setting</p>
<p>deploy:</p>
<ul>
<li>
<p>provider: WebDeploy</p>
<p>server: https://publicip:8172/msdeploy.axd?site=Public ip:portnumber</p>
<p>website: public ip :port number</p>
</li>
</ul>
<p>Have any setting CI for deployment public ip:port number</p>
<p>Thanks & Regards<br>
Chetan Kosrabe</p></div>Chetan Kosrabetag:help.appveyor.com,2012-11-13:Comment/380145292018-08-01T20:46:56Z2018-08-01T20:46:56ZPushing a feature branch schedules two builds<div><p><code>website</code> setting in Web Deploy provider is for <strong>site name</strong> in IIS and has nothing to do with IP and/or port.</p>
<p>If you have control over IIS server to which you are deploying, you can change website bindings there.</p>
<p>Other option is to use <a href="https://www.appveyor.com/docs/deployment/agent/">deployment agent</a> where you can control IP and port.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/380145292018-09-18T00:25:41Z2018-09-18T01:10:15ZPushing a feature branch schedules two builds<div><p>I have enabled "Do not build feature branch if open PR exists" but I am still seeing both "branch" and "pr" builds for any push to a PR on the branch on the main repo. Any suggestions?</p></div>Bryan Vtag:help.appveyor.com,2012-11-13:Comment/380145292018-09-18T04:58:28Z2018-09-18T04:58:28ZPushing a feature branch schedules two builds<div><p>Read <a href="https://help.appveyor.com/discussions/questions/18437-skip_branch_with_pr-setting-doesnt-work">this thread</a>.</p></div>Owen McDonnell