Multi-branch configuration is not supported

Nguyen Linh's Avatar

Nguyen Linh

13 Aug, 2019 03:29 AM

Hi,

I'm using Appveyor for project CI/CD pipeline.
Currently I'm following the tutorial about multiple branches configuration

This is my configuration:

version: 1.0.{build}

only_commits:
 files:
  - projects/ngrx-message-bus/

environment:

  # Node version which will be used for compiling application.
  nodejs_version: "10.13.0"

  # Name of library package
  LIBRARY_NAME: "ngrx-message-bus"

  # API Key used for deploying to MyGet npm.
  API_KEY_MY_GET:
    secure: 0HqMlO4KT03m1Obda0ta46zbO1EgtiSouotet2O7J7QU5SMEJfrv+GgM0cuNPL9l

install:
  # Get the latest stable version of Node.js.
  - ps: Install-Product node $env:nodejs_version

  # Install npm package.
  - npm install --loglevel=error

  # Install angular-cli as global package.
  - npm install @angular/cli -g

  # Install Typescript 3.4.2.
  - npm install typescript@3.4.2 --save-dev

build_script:
  # Build application in production mode.
  - ng build ngrx-message-bus

after_build:
  # Copy README.md to distributed folder.
  - copy README.md dist/%LIBRARY_NAME% /Y

for:
-
  branches:
      only:
        - my-get

  before_deploy:
    # Jump to distribution folder.
    - cd dist/%LIBRARY_NAME%

    # Prepare npm deployment.
    - echo registry=https://www.myget.org/F/%LIBRARY_NAME%/npm/ >> .npmrc
    - echo //www.myget.org/F/%LIBRARY_NAME%/npm/:_authToken=%API_KEY_MY_GET% >> .npmrc

  deploy_script:
    - npm publish

When I added these information above using AppVeyor restful api, I received bad request with error message "Multi-branch configuration is not supported". (Please see the attachment for more detail).

What wrong with my configuration ?

Thank you.

  1. Support Staff 1 Posted by Owen McDonnell on 13 Aug, 2019 04:31 PM

    Owen McDonnell's Avatar

    Nothing is wrong with your configuration if it were in an appveyor.yml file, but multi-branch configuration is not possible in the UI, which is what you are trying to update by making the api call.

  2. 2 Posted by Nguyen Linh on 14 Aug, 2019 07:48 AM

    Nguyen Linh's Avatar

    Thank you for your reply.

    Any solutions to upload the yaml configuration file please ?
    As previously, I had to commit yaml file again and again to test my configuration, after everything works correctly, I had to hard reset my repo. It was very annoying. If there are any ways to upload yaml file directly to appveyor with mult-branch configuration, it would be nice.

  3. Support Staff 3 Posted by Owen McDonnell on 14 Aug, 2019 01:40 PM

    Owen McDonnell's Avatar

    Sure you could keep your yaml file in an alternate location.

  4. Ilya Finkelshteyn closed this discussion on 14 Oct, 2019 09:01 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