Only initiate builds from specific branches

julian's Avatar

julian

28 Sep, 2017 01:48 PM

HI

Using Visual Studio 2015 / Bitbucket

We have 2 branches that we need to auto-deploy from: 'staging' and 'master'

We do not want to initiate an appveyor build from any other branch.

We are using the structure below as suggested in https://www.appveyor.com/docs/branches :

-
  branches:
    only:
      - staging
     # build specifics removed for brevity
-
  branches:
    only:
      - master
     # build specifics removed
-
  configuration: Debug

However, if I deploy from a feature/xxx branch this does seem to initiate a build which fails with:

"Specify which project or solution file to use because the folder contains more than one project or solution file."

How can we set up a structure that will only build from 'staging' or 'master'

Regards

Julian

  1. 1 Posted by Ilya Finkelshte... on 28 Sep, 2017 09:58 PM

    Ilya Finkelshteyn's Avatar

    Hi Julian,

    Last part, e.g

    - 
      configuration: Debug
    

    is default / fallback configuration. You have to remove it for your case.

    Side note: YAML file should have the same content across branches. If you do not like manually synchronizing YAML file content, you can use remote YAML file

  2. 2 Posted by julian on 29 Sep, 2017 08:20 AM

    julian's Avatar

    That's great

    Thanks

    J

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:20 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